From: Ilia Alshanetsky Date: Fri, 3 Dec 2004 02:26:36 +0000 (+0000) Subject: MFH: Fixed bug #30962 (mssql returns space for NULL columns). X-Git-Tag: php-5.0.3RC2~40 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=238393e58ae48d0a3d9081107889b54960e8cacf;p=php MFH: Fixed bug #30962 (mssql returns space for NULL columns). --- diff --git a/NEWS b/NEWS index a91f80c3fc..6b5c8f58ea 100644 --- 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). diff --git a/ext/mssql/php_mssql.c b/ext/mssql/php_mssql.c index ebb9d9a82b..09c1bf8f52 100644 --- a/ext/mssql/php_mssql.c +++ b/ext/mssql/php_mssql.c @@ -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--;