Red Hat Bugzilla – Bug 244736
varchar fields with empty string return NULL
Last modified: 2007-11-30 17:12:07 EST
Description of problem:
when selecting a varchar column that contains an empty string (""), php returns
a NULL instead of "".
Version-Release number of selected component (if applicable):
Created attachment 157322 [details]
Patch based off of 5.1.6 to fix the issue.
PHP Bug URL: http://bugs.php.net/bug.php?id=39213
PHP Bug URL(dup): http://bugs.php.net/bug.php?id=41539
Freetds Bug URL:
Created attachment 157325 [details]
PHP test case.
Well, it is an issue for FC6 only.
php-5.2.2 (from Fedora 7) seems to have this fixed, but partially (only in one
of two functions from the comment #1 patch). Is it enough to fix only
Also note, that you should first check a pointer for NULL, and then for zero
length of pointer's data...