iliaa           Tue Nov 13 20:08:05 2007 UTC

  Modified files:              (Branch: PHP_5_2)
    /php-src/ext/pgsql  pgsql.c 
    /php-src    NEWS 
  Log:
  
  MFB: Fixed bug #43279 (pg_send_query_params() converts all elements in
  'params' to strings)
  
http://cvs.php.net/viewvc.cgi/php-src/ext/pgsql/pgsql.c?r1=1.331.2.13.2.25&r2=1.331.2.13.2.26&diff_format=u
Index: php-src/ext/pgsql/pgsql.c
diff -u php-src/ext/pgsql/pgsql.c:1.331.2.13.2.25 
php-src/ext/pgsql/pgsql.c:1.331.2.13.2.26
--- php-src/ext/pgsql/pgsql.c:1.331.2.13.2.25   Wed Oct  3 23:31:58 2007
+++ php-src/ext/pgsql/pgsql.c   Tue Nov 13 20:08:04 2007
@@ -20,7 +20,7 @@
    +----------------------------------------------------------------------+
  */
  
-/* $Id: pgsql.c,v 1.331.2.13.2.25 2007/10/03 23:31:58 iliaa Exp $ */
+/* $Id: pgsql.c,v 1.331.2.13.2.26 2007/11/13 20:08:04 iliaa Exp $ */
 
 #include <stdlib.h>
 
@@ -4083,6 +4083,7 @@
                php_error_docref(NULL TSRMLS_CC, E_NOTICE, "There are results 
on this connection. Call pg_get_result() until it returns FALSE");
        }
 
+       SEPARATE_ZVAL(pv_param_arr);
        zend_hash_internal_pointer_reset(Z_ARRVAL_PP(pv_param_arr));
        num_params = zend_hash_num_elements(Z_ARRVAL_PP(pv_param_arr));
        if (num_params > 0) {
@@ -4097,7 +4098,8 @@
                        }
 
                        otype = (*tmp)->type;
-                       convert_to_string(*tmp);
+                       SEPARATE_ZVAL(tmp);
+                       convert_to_string_ex(tmp);
                        if (Z_TYPE_PP(tmp) != IS_STRING) {
                                php_error_docref(NULL TSRMLS_CC, 
E_WARNING,"Error converting parameter");
                                _php_pgsql_free_params(params, num_params);
http://cvs.php.net/viewvc.cgi/php-src/NEWS?r1=1.2027.2.547.2.1009&r2=1.2027.2.547.2.1010&diff_format=u
Index: php-src/NEWS
diff -u php-src/NEWS:1.2027.2.547.2.1009 php-src/NEWS:1.2027.2.547.2.1010
--- php-src/NEWS:1.2027.2.547.2.1009    Tue Nov 13 15:10:04 2007
+++ php-src/NEWS        Tue Nov 13 20:08:04 2007
@@ -1,6 +1,8 @@
 PHP                                                                        NEWS
 |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
 ?? ??? 2008, PHP 5.2.6
+- Fixed bug #43279 (pg_send_query_params() converts all elements in 'params' 
+  to strings). (Ilia)
 - Fixed bug #43248 (backward compatibility break in realpath()). (Dmitry)
 - Fixed bug #43221 (SimpleXML adding default namespace in addAttribute). (Rob)
 - Fixed bug #43216 (stream_is_local() returns false on "file://"). (Dmitry)

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

Reply via email to