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;
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;
}