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

index 822bcf15ad387128224da3f2bf81cb60a1d87342..7987046982a5325ed52654080a3964dfdfd8163c 100644 (file)
@@ -2067,19 +2067,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 */