Bug #14291: NULLs not returned in named indices by mysql_fetch_xxx with MYSQL_BOTH
| From: | at217 at chebucto dot ns dot ca | Date: | Thu, 29 Nov 2001 21:03:56 +0000 |
| Subject: | Bug #14291: NULLs not returned in named indices by mysql_fetch_xxx with MYSQL_BOTH | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-72073@lists.php.net to get a copy of this message | ||
From: at217@chebucto.ns.ca
Operating system: Linux x86
PHP version: 4.0.6
PHP Bug Type: MySQL related
Bug description: NULLs not returned in named indices by mysql_fetch_xxx with MYSQL_BOTH
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.
--
Edit bug report at: http://bugs.php.net/?id=14291&edit=1