Fixed bug #30962 (mssql returns space for NULL columns).

This commit is contained in:
Ilia Alshanetsky 2004-12-03 02:26:04 +00:00
parent 2844354634
commit e99526eb7e

View File

@ -800,6 +800,10 @@ static void php_mssql_get_column_content_with_type(mssql_link *mssql_ptr,int off
char *data = charcol(offset); char *data = charcol(offset);
length=dbdatlen(mssql_ptr->link,offset); length=dbdatlen(mssql_ptr->link,offset);
if (!length) {
ZVAL_EMPTY_STRING(result);
break;
}
#if ilia_0 #if ilia_0
while (length>0 && data[length-1] == ' ') { /* nuke trailing whitespace */ while (length>0 && data[length-1] == ' ') { /* nuke trailing whitespace */
length--; length--;