wez Sat Sep 10 17:00:53 2005 EDT
Added files: (Branch: PHP_5_1)
/php-src/ext/pdo_pgsql/tests bug_33876.phpt
Modified files:
/php-src/ext/pdo_pgsql pgsql_statement.c
Log:
if a php bolean makes it as far as the parameter callback, it must really need
to be boolean; express is as native pgsql 't' or 'f'.
Add a test case for Bug #33876, which is a partially bogus bug.
http://cvs.php.net/diff.php/php-src/ext/pdo_pgsql/pgsql_statement.c?r1=1.31.2.1&r2=1.31.2.2&ty=u
Index: php-src/ext/pdo_pgsql/pgsql_statement.c
diff -u php-src/ext/pdo_pgsql/pgsql_statement.c:1.31.2.1
php-src/ext/pdo_pgsql/pgsql_statement.c:1.31.2.2
--- php-src/ext/pdo_pgsql/pgsql_statement.c:1.31.2.1 Sat Sep 3 19:50:25 2005
+++ php-src/ext/pdo_pgsql/pgsql_statement.c Sat Sep 10 17:00:52 2005
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: pgsql_statement.c,v 1.31.2.1 2005/09/03 23:50:25 edink Exp $ */
+/* $Id: pgsql_statement.c,v 1.31.2.2 2005/09/10 21:00:52 wez Exp $ */
#ifdef HAVE_CONFIG_H
#include "config.h"
@@ -203,6 +203,10 @@
Z_TYPE_P(param->parameter) == IS_NULL) {
S->param_values[param->paramno]
= NULL;
S->param_lengths[param->paramno] = 0;
+ } else if (Z_TYPE_P(param->parameter)
== IS_BOOL) {
+ S->param_values[param->paramno]
= Z_BVAL_P(param->parameter) ? "t" : "f";
+
S->param_lengths[param->paramno] = 1;
+
S->param_formats[param->paramno] = 1;
} else {
convert_to_string(param->parameter);
S->param_values[param->paramno]
= Z_STRVAL_P(param->parameter);
http://cvs.php.net/co.php/php-src/ext/pdo_pgsql/tests/bug_33876.phpt?r=1.1&p=1
Index: php-src/ext/pdo_pgsql/tests/bug_33876.phpt
+++ php-src/ext/pdo_pgsql/tests/bug_33876.phpt
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php