php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #14291 NULLs not returned in named indices by mysql_fetch_xxx with MYSQL_BOTH
Submitted: 2001-11-29 16:03 UTC Modified: 2001-12-30 05:04 UTC
From: at217 at chebucto dot ns dot ca Assigned: Zak (profile)
Status: Closed Package: MySQL related
PHP Version: 4.0.6 OS: Linux x86
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: at217 at chebucto dot ns dot ca
New email:
PHP Version: OS:

 

 [2001-11-29 16:03 UTC] at217 at chebucto dot ns dot ca
The code in php_mysql_fetch_hash() (in php_mysql.c) for handling NULL values (near the end of the function) sets only the numeric index when the return_type is MYSQL_BOTH, but it should be setting the named index as well.

Changing the "else" clause to:

if (result_type & MYSQL_ASSOC)

should fix things.

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2001-12-10 20:50 UTC] zak@php.net
Will check out later tonight.

 [2001-12-30 05:04 UTC] zak@php.net
Thanks for the report!

The fix has been made and is currently available in the 
CVS version of PHP. The fix *should* be in the next 
release of PHP. See 
http://marc.theaimsgroup.com/?l=php-cvs&m=100970643121952&w=2 
for details.

 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri May 17 14:01:33 2024 UTC