From: Ilia Alshanetsky Date: Fri, 3 Dec 2004 02:26:04 +0000 (+0000) Subject: Fixed bug #30962 (mssql returns space for NULL columns). X-Git-Tag: RELEASE_0_2~586 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=e99526eb7eb5b1353c8c8c600b8c946247eda45c;p=php Fixed bug #30962 (mssql returns space for NULL columns). --- diff --git a/ext/mssql/php_mssql.c b/ext/mssql/php_mssql.c index 0d12dc4ed9..538bc24ba5 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--;