From fa3568d49097257d1a5d4349e03f81c4c347ceb8 Mon Sep 17 00:00:00 2001 From: Ilia Alshanetsky Date: Fri, 3 Dec 2004 02:27:11 +0000 Subject: MFH: Fixed bug #30962 (mssql returns space for NULL columns). --- ext/mssql/php_mssql.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'ext/mssql/php_mssql.c') diff --git a/ext/mssql/php_mssql.c b/ext/mssql/php_mssql.c index fbc5edef3f..20c72194c2 100644 --- a/ext/mssql/php_mssql.c +++ b/ext/mssql/php_mssql.c @@ -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--; -- cgit v1.2.1