Hi Ilia,

That fix does not do anuthing. The data length is checked above this code
and a NULL value is returned on an empty string.

- Frank

> iliaa         Thu Dec  2 21:26:04 2004 EDT
> 
>   Modified files:              
>     /php-src/ext/mssql        php_mssql.c 
>   Log:
>   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_0
>                       while (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
> 

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

Reply via email to