Re: cvs: php-src /ext/mssql php_mssql.c
| From: | Andi Gutmans | Date: | Fri, 03 Dec 2004 02:41:32 +0000 |
| Subject: | Re: cvs: php-src /ext/mssql php_mssql.c | ||
| References: | 1 | Groups: | php.cvs |
| Request: | Send a blank email to php-cvs+get-29395@lists.php.net to get a copy of this message | ||
Do we want to return empty string or NULL?
Andi
At 02:26 AM 12/3/2004 +0000, Ilia Alshanetsky wrote:
iliaa Thu Dec 2 21:26:04 2004 EDTModified files:/php-src/ext/mssql php_mssql.cLog: Fixed bug #30962 (mssql returns space for NULL columns). http://cvs.php.net/diff.php/php-src/ext/mssql/php_mssql.c?r1=1.142&r2=1.143&ty=u Index: php-src/ext/mssql/php_mssql.c diff -u php-src/ext/mssql/php_mssql.c:1.142 php-src/ext/mssql/php_mssql.c:1.143 --- php-src/ext/mssql/php_mssql.c:1.142 Mon Nov 15 18:37:05 2004+++ php-src/ext/mssql/php_mssql.c Thu Dec 2 21:26:04 2004@@ -16,7 +16,7 @@+----------------------------------------------------------------------+*/ -/* $Id: php_mssql.c,v 1.142 2004/11/15 23:37:05 iliaa Exp $ */ +/* $Id: php_mssql.c,v 1.143 2004/12/03 02:26:04 iliaa Exp $ */ #ifdef COMPILE_DL_MSSQL #define HAVE_MSSQL 1 @@ -800,6 +800,10 @@char *data = charcol(offset);length=dbdatlen(mssql_ptr->link,offset); + if (!length) { + ZVAL_EMPTY_STRING(result); + break; + }#if ilia_0while (length>0 && data[length-1] == ' ') { /* nuke trailing whitespace */ length--;-- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php