abies Tue Jun 1 19:31:44 2004 EDT Modified files: /php-src/ext/interbase ibase_query.c Log: Don't be too strict if the number of binding arguments provided exceeds the expected number http://cvs.php.net/diff.php/php-src/ext/interbase/ibase_query.c?r1=1.15&r2=1.16&ty=u Index: php-src/ext/interbase/ibase_query.c diff -u php-src/ext/interbase/ibase_query.c:1.15 php-src/ext/interbase/ibase_query.c:1.16 --- php-src/ext/interbase/ibase_query.c:1.15 Tue Jun 1 13:14:47 2004 +++ php-src/ext/interbase/ibase_query.c Tue Jun 1 19:31:43 2004 @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: ibase_query.c,v 1.15 2004/06/01 17:14:47 abies Exp $ */ +/* $Id: ibase_query.c,v 1.16 2004/06/01 23:31:43 abies Exp $ */ #ifdef HAVE_CONFIG_H #include "config.h" @@ -1137,10 +1137,11 @@ expected_n = ib_query.in_sqlda ? ib_query.in_sqlda->sqld : 0; if (bind_n != expected_n) { - _php_ibase_module_error("Statement expects %d arguments, %d given" TSRMLS_CC, - expected_n, bind_n); - break; - + php_error_docref(NULL TSRMLS_CC, (bind_n < expected_n) ? E_WARNING : E_NOTICE, + "Statement expects %d arguments, %d given", expected_n, bind_n); + if (bind_n < expected_n) { + break; + } } else if (bind_n > 0) { bind_args = (zval ***) do_alloca(sizeof(zval **) * ZEND_NUM_ARGS()); @@ -1810,9 +1811,11 @@ expected_n = ib_query->in_sqlda ? ib_query->in_sqlda->sqld : 0; if (bind_n != expected_n) { - _php_ibase_module_error("Statement expects %d arguments, %d given" TSRMLS_CC, - expected_n, bind_n); - break; + php_error_docref(NULL TSRMLS_CC, (bind_n < expected_n) ? E_WARNING : E_NOTICE, + "Statement expects %d arguments, %d given", expected_n, bind_n); + if (bind_n < expected_n) { + break; + } } else if (bind_n > 0) { /* have variables to bind */ args = (zval ***) do_alloca(ZEND_NUM_ARGS() * sizeof(zval **));
-- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php