andrey          Sat May  7 03:44:41 2005 EDT

  Modified files:              
    /php-src/ext/mysqli mysqli_api.c 
  Log:
  bail out when detecting incorrect number of parameters to be bound.
  
  
http://cvs.php.net/diff.php/php-src/ext/mysqli/mysqli_api.c?r1=1.109&r2=1.110&ty=u
Index: php-src/ext/mysqli/mysqli_api.c
diff -u php-src/ext/mysqli/mysqli_api.c:1.109 
php-src/ext/mysqli/mysqli_api.c:1.110
--- php-src/ext/mysqli/mysqli_api.c:1.109       Fri May  6 06:09:42 2005
+++ php-src/ext/mysqli/mysqli_api.c     Sat May  7 03:44:41 2005
@@ -15,7 +15,7 @@
   | Author: Georg Richter <[EMAIL PROTECTED]>                                |
   +----------------------------------------------------------------------+
 
-  $Id: mysqli_api.c,v 1.109 2005/05/06 10:09:42 andrey Exp $ 
+  $Id: mysqli_api.c,v 1.110 2005/05/07 07:44:41 andrey Exp $ 
 */
 
 #ifdef HAVE_CONFIG_H
@@ -109,12 +109,13 @@
                start = 1;
        }
 
-       if (strlen(types) != argc - start) {
+       if (typelen != argc - start) {
                /* number of bind variables doesn't match number of elements in 
type definition string */
                php_error_docref(NULL TSRMLS_CC, E_WARNING, "Number of elements 
in type definition string doesn't match number of bind variables");
+               RETURN_FALSE;
        }
 
-       if (argc - start != stmt->stmt->param_count) {
+       if (typelen != stmt->stmt->param_count) {
                php_error_docref(NULL TSRMLS_CC, E_WARNING, "Number of 
variables doesn't match number of parameters in prepared statement");
                RETURN_FALSE;
        }

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

Reply via email to