From: Antony Dovgal Date: Tue, 30 May 2006 09:46:01 +0000 (+0000) Subject: need to call zend_is_callable() if callable is known to be invalid X-Git-Tag: BEFORE_NEW_OUTPUT_API~38 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=cfeff66e9a4ed45022e2d3a948dc059c82042825;p=php need to call zend_is_callable() if callable is known to be invalid --- diff --git a/ext/pdo/pdo_stmt.c b/ext/pdo/pdo_stmt.c index d40fe304f7..ef8abd6e65 100755 --- a/ext/pdo/pdo_stmt.c +++ b/ext/pdo/pdo_stmt.c @@ -651,7 +651,7 @@ static int do_fetch_class_prepare(pdo_stmt_t *stmt TSRMLS_DC) /* {{{ */ 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 @@ static int make_callable_ex(pdo_stmt_t *stmt, zval *callable, zend_fcall_info * 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; }