From 4874397501229777f8ddfd3b23dc953797379b5f Mon Sep 17 00:00:00 2001 From: "Frank M. Kromann" Date: Sun, 4 Feb 2007 21:24:28 +0000 Subject: MFB: #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 1e42573326..6d62af0b1a 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