Bug 244736 - varchar fields with empty string return NULL
varchar fields with empty string return NULL
Status: CLOSED CURRENTRELEASE
Product: Fedora
Classification: Fedora
Component: php-extras (Show other bugs)
6
All Linux
low Severity low
: ---
: ---
Assigned To: Dmitry Butskoy
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2007-06-18 16:19 EDT by Edward Rudd
Modified: 2007-11-30 17:12 EST (History)
0 users

See Also:
Fixed In Version: 5.1.6-4
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2007-06-22 08:03:17 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
Patch based off of 5.1.6 to fix the issue. (773 bytes, patch)
2007-06-18 16:19 EDT, Edward Rudd
no flags Details | Diff
PHP test case. (1.16 KB, text/plain)
2007-06-18 16:28 EDT, Edward Rudd
no flags Details

  None (edit)
Description Edward Rudd 2007-06-18 16:19:53 EDT
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):
5.1.6-3.fc6
Comment 1 Edward Rudd 2007-06-18 16:19:53 EDT
Created attachment 157322 [details]
Patch based off of 5.1.6 to fix the issue.
Comment 3 Edward Rudd 2007-06-18 16:28:12 EDT
Created attachment 157325 [details]
PHP test case.
Comment 4 Dmitry Butskoy 2007-06-19 08:21:40 EDT
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
"_with_type" case?

Also note, that you should first check a pointer for NULL, and then for zero
length of pointer's data...




Note You need to log in before you can comment on or make changes to this bug.