From: Marcus Boerger Date: Fri, 16 Dec 2005 22:26:43 +0000 (+0000) Subject: - MFB Fix zend_is_callable() usage X-Git-Tag: RELEASE_1_0_4~363 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=927016e1545760889fd22d4efb9fb79203aab5ca;p=php - MFB Fix zend_is_callable() usage --- diff --git a/ext/standard/basic_functions.c b/ext/standard/basic_functions.c index 06218b8934..ada1bba1fa 100644 --- a/ext/standard/basic_functions.c +++ b/ext/standard/basic_functions.c @@ -2074,7 +2074,7 @@ PHP_FUNCTION(call_user_func) convert_to_string_ex(params[0]); } - if (!zend_is_callable(*params[0], IS_CALLABLE_CHECK_NO_ACCESS, &name)) { + if (!zend_is_callable(*params[0], 0, &name)) { convert_to_string(&name); php_error_docref1(NULL TSRMLS_CC, Z_STRVAL(name), E_WARNING, "First argument is expected to be a valid callback"); zval_dtor(&name); @@ -2138,7 +2138,7 @@ PHP_FUNCTION(call_user_func_array) convert_to_string_ex(func); } - if (!zend_is_callable(*func, IS_CALLABLE_CHECK_NO_ACCESS, &name)) { + if (!zend_is_callable(*func, 0, &name)) { php_error_docref(NULL TSRMLS_CC, E_WARNING, "First argument is expected to be a valid callback, '%R' was given", Z_TYPE(name), Z_UNIVAL(name)); zval_dtor(&name); RETURN_NULL(); @@ -2408,7 +2408,7 @@ PHP_FUNCTION(register_shutdown_function) } /* Prevent entering of anything but valid callback (syntax check only!) */ - if (!zend_is_callable(shutdown_function_entry.arguments[0], 1, &function_name)) { + if (!zend_is_callable(shutdown_function_entry.arguments[0], 0, &function_name)) { php_error_docref(NULL TSRMLS_CC, E_WARNING, "Invalid shutdown callback '%R' passed", Z_TYPE(function_name), Z_UNIVAL(function_name)); efree(shutdown_function_entry.arguments); RETVAL_FALSE;