]> 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:26:36 +0000 (02:26 +0000)
committerIlia Alshanetsky <iliaa@php.net>
Fri, 3 Dec 2004 02:26:36 +0000 (02:26 +0000)
NEWS
ext/mssql/php_mssql.c

diff --git a/NEWS b/NEWS
index a91f80c3fc1679c8ec2cdce528f4c0c63a6a1126..6b5c8f58eaa4b9fb6f3cc2df4583dc5c286096a9 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -7,6 +7,7 @@ PHP                                                                        NEWS
 - Extended the functionality of is_subclass_of() to accept either a class name
   or an object as first parameter. (Andrey) 
 - Fixed potential problems with unserializing invalid serialize data. (Marcus)
+- Fixed bug #30962 (mssql returns space for NULL columns). (Ilia)
 - Fixed bug #30856 (ReflectionClass::getStaticProperties segfaults). (Marcus)
 - Fixed bug #30832 ("!" stripped off comments in xml parser). (Rob)
 - Fixed bug #30799 (SoapServer doesn't handle private or protected properties).
index ebb9d9a82bf34fd65abbaa30b6755ce2e0b618aa..09c1bf8f52adf3d49e21201ad3f508949c52f397 100644 (file)
@@ -800,6 +800,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--;