From: Ilia Alshanetsky Date: Wed, 5 Mar 2008 23:53:23 +0000 (+0000) Subject: MFB: Revert patch for bug #44325 X-Git-Tag: php-5.2.6RC2~4 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=abc636346237b98e9d049d9cac0317d3286a0d52;p=php MFB: Revert patch for bug #44325 --- diff --git a/NEWS b/NEWS index 6edb2a0d34..59310f0e90 100644 --- a/NEWS +++ b/NEWS @@ -3,8 +3,6 @@ PHP NEWS ?? Mar 2008, PHP 5.2.6 - Fixed bug #44333 (SEGFAULT when using mysql_pconnect() with client_flags). (Felipe) -- Fixed bug #44325 (mssql_bind not correctly bind empty strings as parameter - value). (Ilia) - Fixed bug #44306 (Better detection of MIPS processors on Windows). (Ilia) - Fixed bug #44166 (Parameter handling flaw in PDO::getAvailableDrivers()). (Ilia) diff --git a/ext/mssql/php_mssql.c b/ext/mssql/php_mssql.c index 7ad75912f2..c91b98d7dd 100644 --- a/ext/mssql/php_mssql.c +++ b/ext/mssql/php_mssql.c @@ -2063,19 +2063,14 @@ PHP_FUNCTION(mssql_bind) /* modify datalen and maxlen according to dbrpcparam documentation */ if ( (type==SQLVARCHAR) || (type==SQLCHAR) || (type==SQLTEXT) ) { /* variable-length type */ - if (is_null || Z_TYPE_PP(var) == IS_NULL) { + if (is_null) { maxlen=0; datalen=0; - } else { + } + else { convert_to_string_ex(var); - datalen = Z_STRLEN_PP(var); - value = (LPBYTE)Z_STRVAL_PP(var); - if (!datalen) { - datalen = 1; - if (maxlen == -1) { - maxlen = 1; - } - } + datalen=Z_STRLEN_PP(var); + value=(LPBYTE)Z_STRVAL_PP(var); } } else { /* fixed-length type */