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
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
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

Pull Requests

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-2025 The PHP Group
All rights reserved.
Last updated: Tue May 06 11:01:30 2025 UTC