]> granicus.if.org Git - php/commitdiff
MFB: Revert patch for bug #44325
authorIlia Alshanetsky <iliaa@php.net>
Wed, 5 Mar 2008 23:53:23 +0000 (23:53 +0000)
committerIlia Alshanetsky <iliaa@php.net>
Wed, 5 Mar 2008 23:53:23 +0000 (23:53 +0000)
NEWS
ext/mssql/php_mssql.c

diff --git a/NEWS b/NEWS
index 6edb2a0d34ae438e6d831dde4ed88059eb105292..59310f0e90804b1a993f3b1cf5f737099ab5298a 100644 (file)
--- 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)
index 7ad75912f27806dfe247a09b58c0c5f346ce6fc3..c91b98d7dd52a028cb7937ba9b43c285b6e733cf 100644 (file)
@@ -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 */