]> granicus.if.org Git - php/commitdiff
- MFB Fix zend_is_callable() usage
authorMarcus Boerger <helly@php.net>
Fri, 16 Dec 2005 22:26:43 +0000 (22:26 +0000)
committerMarcus Boerger <helly@php.net>
Fri, 16 Dec 2005 22:26:43 +0000 (22:26 +0000)
ext/standard/basic_functions.c

index 06218b8934e4b2af6bb7a8e64301b2a0da864d42..ada1bba1fa2952694aa0b57c3ea647098458481f 100644 (file)
@@ -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;