Skip to content

Commit b436ad2

Browse files
committed
#39213
Fix for '' returned as ' '. This only works with FreeTDS as microsofts library returns a length of 1 for an empty string!
1 parent 8509982 commit b436ad2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

ext/mssql/php_mssql.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -821,7 +821,7 @@ PHP_FUNCTION(mssql_select_db)
821821

822822
static void php_mssql_get_column_content_with_type(mssql_link *mssql_ptr,int offset,zval *result, int column_type TSRMLS_DC)
823823
{
824-
if (dbdatlen(mssql_ptr->link,offset) == 0) {
824+
if (dbdata(mssql_ptr->link,offset) == NULL && dbdatlen(mssql_ptr->link,offset) == 0) {
825825
ZVAL_NULL(result);
826826
return;
827827
}

0 commit comments

Comments
 (0)