From b436ad2af56f838dd293e56b842259418ec02b5e Mon Sep 17 00:00:00 2001 From: "Frank M. Kromann" Date: Sun, 4 Feb 2007 21:19:37 +0000 Subject: #39213 Fix for '' returned as ' '. This only works with FreeTDS as microsofts library returns a length of 1 for an empty string! --- ext/mssql/php_mssql.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'ext/mssql/php_mssql.c') diff --git a/ext/mssql/php_mssql.c b/ext/mssql/php_mssql.c index 26881e872c..764151a3d3 100644 --- a/ext/mssql/php_mssql.c +++ b/ext/mssql/php_mssql.c @@ -821,7 +821,7 @@ PHP_FUNCTION(mssql_select_db) static void php_mssql_get_column_content_with_type(mssql_link *mssql_ptr,int offset,zval *result, int column_type TSRMLS_DC) { - if (dbdatlen(mssql_ptr->link,offset) == 0) { + if (dbdata(mssql_ptr->link,offset) == NULL && dbdatlen(mssql_ptr->link,offset) == 0) { ZVAL_NULL(result); return; } -- cgit v1.2.1