summaryrefslogtreecommitdiff
path: root/ext/spl
diff options
context:
space:
mode:
authorDmitry Stogov <dmitry@php.net>2008-07-26 13:14:56 +0000
committerDmitry Stogov <dmitry@php.net>2008-07-26 13:14:56 +0000
commitbdf7981e28a64392908e275d4d3398f8f2028162 (patch)
tree64fed56befc4a98f6e9ff0c8244ff3d3036f622f /ext/spl
parenta3f0f90dfd11f0f28fac5c6bf3d8849bbe6dbe8a (diff)
downloadphp-git-bdf7981e28a64392908e275d4d3398f8f2028162.tar.gz
Fixed is_callable/call_user_func mess that had done different things for very similar arguments e.g. array("A","B") and "A::B"
Diffstat (limited to 'ext/spl')
-rwxr-xr-xext/spl/php_spl.c4
-rwxr-xr-xext/spl/tests/spl_autoload_007.phpt6
2 files changed, 5 insertions, 5 deletions
diff --git a/ext/spl/php_spl.c b/ext/spl/php_spl.c
index ebacf6db68..f8fa3a5a60 100755
--- a/ext/spl/php_spl.c
+++ b/ext/spl/php_spl.c
@@ -453,7 +453,7 @@ PHP_FUNCTION(spl_autoload_register)
zval_dtor(&ztmp);
}
- if (!zend_is_callable_ex(zcallable, IS_CALLABLE_STRICT, &zfunc_name, &fcc, &error TSRMLS_CC)) {
+ if (!zend_is_callable_ex(zcallable, NULL, IS_CALLABLE_STRICT, &zfunc_name, &fcc, &error TSRMLS_CC)) {
alfi.ce = fcc.calling_scope;
alfi.func_ptr = fcc.function_handler;
obj_ptr = fcc.object_pp;
@@ -583,7 +583,7 @@ PHP_FUNCTION(spl_autoload_unregister)
return;
}
- if (!zend_is_callable_ex(zcallable, IS_CALLABLE_CHECK_SYNTAX_ONLY, &zfunc_name, &fcc, &error TSRMLS_CC)) {
+ if (!zend_is_callable_ex(zcallable, NULL, IS_CALLABLE_CHECK_SYNTAX_ONLY, &zfunc_name, &fcc, &error TSRMLS_CC)) {
zend_throw_exception_ex(spl_ce_LogicException, 0 TSRMLS_CC, "Unable to unregister invalid function (%s)", error);
if (error) {
efree(error);
diff --git a/ext/spl/tests/spl_autoload_007.phpt b/ext/spl/tests/spl_autoload_007.phpt
index 3b6b3b90c1..3852578cf9 100755
--- a/ext/spl/tests/spl_autoload_007.phpt
+++ b/ext/spl/tests/spl_autoload_007.phpt
@@ -57,7 +57,7 @@ foreach($funcs as $idx => $func)
<?php exit(0); ?>
--EXPECTF--
unicode(22) "MyAutoLoader::notExist"
-Function 'MyAutoLoader::notExist' not found (class 'MyAutoLoader' does not have a method 'notexist')
+Function 'MyAutoLoader::notExist' not found (class 'MyAutoLoader' does not have a method 'notExist')
unicode(22) "MyAutoLoader::noAccess"
Function 'MyAutoLoader::noAccess' not callable (cannot access protected method MyAutoLoader::noAccess())
@@ -74,7 +74,7 @@ array(2) {
[1]=>
unicode(8) "notExist"
}
-Passed array does not specify an existing static method (class 'MyAutoLoader' does not have a method 'notexist')
+Passed array does not specify an existing static method (class 'MyAutoLoader' does not have a method 'notExist')
array(2) {
[0]=>
@@ -107,7 +107,7 @@ array(2) {
[1]=>
unicode(8) "notExist"
}
-Passed array does not specify an existing method (class 'MyAutoLoader' does not have a method 'notexist')
+Passed array does not specify an existing method (class 'MyAutoLoader' does not have a method 'notExist')
array(2) {
[0]=>