From: Ilia Alshanetsky Date: Wed, 5 Mar 2008 23:52:56 +0000 (+0000) Subject: MFB: Revert patch for bug #44325 X-Git-Tag: RELEASE_2_0_0a1~241 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=1aab3a9b415680992c0adb0c39c558ac776fc740;p=php MFB: Revert patch for bug #44325 --- diff --git a/ext/mssql/php_mssql.c b/ext/mssql/php_mssql.c index a80f84ca83..12f84b57e9 100644 --- a/ext/mssql/php_mssql.c +++ b/ext/mssql/php_mssql.c @@ -2056,19 +2056,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 */