helly Fri Dec 16 22:26:44 2005 EDT
Modified files:
/php-src/ext/standard basic_functions.c
Log:
- MFB Fix zend_is_callable() usage
http://cvs.php.net/viewcvs.cgi/php-src/ext/standard/basic_functions.c?r1=1.742&r2=1.743&diff_format=u
Index: php-src/ext/standard/basic_functions.c
diff -u php-src/ext/standard/basic_functions.c:1.742
php-src/ext/standard/basic_functions.c:1.743
--- php-src/ext/standard/basic_functions.c:1.742 Fri Dec 16 20:50:38 2005
+++ php-src/ext/standard/basic_functions.c Fri Dec 16 22:26:43 2005
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: basic_functions.c,v 1.742 2005/12/16 20:50:38 tony2001 Exp $ */
+/* $Id: basic_functions.c,v 1.743 2005/12/16 22:26:43 helly Exp $ */
#include "php.h"
#include "php_streams.h"
@@ -2074,7 +2074,7 @@
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 @@
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 @@
}
/* 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;
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php