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
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: http://sourceforge.net/tracker/index.php?func=detail&aid=1547066&group_id=33106&atid=407806
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 "_with_type" case? Also note, that you should first check a pointer for NULL, and then for zero length of pointer's data...