]> granicus.if.org Git - php/commitdiff
MFH: Fixed bug #30962 (mssql returns space for NULL columns).
authorIlia Alshanetsky <iliaa@php.net>
Fri, 3 Dec 2004 02:27:11 +0000 (02:27 +0000)
committerIlia Alshanetsky <iliaa@php.net>
Fri, 3 Dec 2004 02:27:11 +0000 (02:27 +0000)
NEWS
ext/mssql/php_mssql.c

diff --git a/NEWS b/NEWS
index df4c223509d4c9a9f45a11c7dc105bde491909e9..f5deac91e8819764cb0df26c3689cd042dc5ce8a 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -1,6 +1,7 @@
 PHP 4                                                                      NEWS
 |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
 ?? Nov 2004, Version 4.3.10
+- Fixed bug #30962 (mssql returns space for NULL columns). (Ilia)
 
 23 Nov 2004, Version 4.3.10RC1
 - Added the %F modifier to *printf to render a non-locale-aware representation
index fbc5edef3f7601657402440805322edeea37fb1e..20c72194c24e2a47a044156145bef133acd9ff17 100644 (file)
@@ -787,6 +787,10 @@ static void php_mssql_get_column_content_with_type(mssql_link *mssql_ptr,int off
                        char *data = charcol(offset);
 
                        length=dbdatlen(mssql_ptr->link,offset);
+                       if (!length) {
+                               ZVAL_EMPTY_STRING(result);
+                               break;
+                       }
 #if ilia_0
                        while (length>0 && data[length-1] == ' ') { /* nuke trailing whitespace */
                                length--;