fmk             Sun Feb  4 21:24:28 2007 UTC

  Modified files:              
    /php-src/ext/mssql  php_mssql.c 
  Log:
  MFB: #39213
  Fix for '' returned as ' '.
  This only works with FreeTDS as microsofts library returns a length of 1 for 
an empty string!
  
http://cvs.php.net/viewvc.cgi/php-src/ext/mssql/php_mssql.c?r1=1.167&r2=1.168&diff_format=u
Index: php-src/ext/mssql/php_mssql.c
diff -u php-src/ext/mssql/php_mssql.c:1.167 php-src/ext/mssql/php_mssql.c:1.168
--- php-src/ext/mssql/php_mssql.c:1.167 Mon Jan  1 09:29:25 2007
+++ php-src/ext/mssql/php_mssql.c       Sun Feb  4 21:24:28 2007
@@ -16,7 +16,7 @@
    +----------------------------------------------------------------------+
  */
 
-/* $Id: php_mssql.c,v 1.167 2007/01/01 09:29:25 sebastian Exp $ */
+/* $Id: php_mssql.c,v 1.168 2007/02/04 21:24:28 fmk Exp $ */
 
 #ifdef COMPILE_DL_MSSQL
 #define HAVE_MSSQL 1
@@ -821,7 +821,7 @@
 
 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;
        }

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to