tony2001                Tue May 30 09:46:01 2006 UTC

  Modified files:              
    /php-src/ext/pdo    pdo_stmt.c 
  Log:
  need to call zend_is_callable() if callable is known to be invalid
  
  
http://cvs.php.net/viewcvs.cgi/php-src/ext/pdo/pdo_stmt.c?r1=1.158&r2=1.159&diff_format=u
Index: php-src/ext/pdo/pdo_stmt.c
diff -u php-src/ext/pdo/pdo_stmt.c:1.158 php-src/ext/pdo/pdo_stmt.c:1.159
--- php-src/ext/pdo/pdo_stmt.c:1.158    Sat Apr 22 19:10:40 2006
+++ php-src/ext/pdo/pdo_stmt.c  Tue May 30 09:46:01 2006
@@ -18,7 +18,7 @@
   +----------------------------------------------------------------------+
 */
 
-/* $Id: pdo_stmt.c,v 1.158 2006/04/22 19:10:40 tony2001 Exp $ */
+/* $Id: pdo_stmt.c,v 1.159 2006/05/30 09:46:01 tony2001 Exp $ */
 
 /* The PDO Statement Handle Class */
 
@@ -651,7 +651,7 @@
 
 static int make_callable_ex(pdo_stmt_t *stmt, zval *callable, zend_fcall_info 
* fci, zend_fcall_info_cache * fcc, int num_args TSRMLS_DC) /* {{{ */
 {
-       zval **object = NULL, **method;
+       zval **object = NULL, **method = NULL;
        zend_class_entry * ce = NULL, **pce;
        zend_function *function_handler;
        zstr lcname;
@@ -688,7 +688,7 @@
                method = &callable;
        }
        
-       if (!zend_is_callable(callable, 0, NULL)) {
+       if (!method || !zend_is_callable(callable, 0, NULL)) {
                pdo_raise_impl_error(stmt->dbh, stmt, "HY000", "user-supplied 
function must be a valid callback" TSRMLS_CC);
                return 0;
        }

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

Reply via email to