- Fixed detection of invalid class name

This commit is contained in:
Felipe Pena 2008-05-08 16:58:43 +00:00
parent cb9f7f675f
commit 496099274b
7 changed files with 20 additions and 20 deletions

View File

@ -10,5 +10,5 @@ array_walk($array, array($nonesuchvar,'show'));
--EXPECTF--
Notice: Undefined variable: nonesuchvar in %s on line %d
Warning: array_walk() expects parameter 2 to be a valid callback, second array member is not a valid method in %s on line %d
Warning: array_walk() expects parameter 2 to be a valid callback, first array member is not a valid class name or object in %s on line %d
===DONE===

View File

@ -3035,7 +3035,7 @@ ZEND_API zend_bool zend_is_callable_ex(zval *callable, uint check_flags, zval *c
}
} else {
if (zend_hash_num_elements(Z_ARRVAL_P(callable)) == 2) {
if (!obj) {
if (!obj || (Z_TYPE_PP(obj) != IS_OBJECT && Z_TYPE_PP(obj) != IS_STRING && Z_TYPE_PP(obj) != IS_UNICODE)) {
if (error) zend_spprintf(error, 0, "first array member is not a valid class name or object");
} else {
if (error) zend_spprintf(error, 0, "second array member is not a valid method");

View File

@ -134,7 +134,7 @@ NULL
Warning: array_filter() expects parameter 2 to be a valid callback, array must have exactly two members in %s on line %d
NULL
-- Iteration 13 --
Warning: array_filter() expects parameter 2 to be a valid callback, second array member is not a valid method in %s on line %d
Warning: array_filter() expects parameter 2 to be a valid callback, first array member is not a valid class name or object in %s on line %d
NULL
-- Iteration 14 --
Warning: array_filter() expects parameter 2 to be a valid callback, first array member is not a valid class name or object in %s on line %d
@ -221,7 +221,7 @@ NULL
Warning: array_filter() expects parameter 2 to be a valid callback, array must have exactly two members in %s on line %d
NULL
-- Iteration 13 --
Warning: array_filter() expects parameter 2 to be a valid callback, second array member is not a valid method in %s on line %d
Warning: array_filter() expects parameter 2 to be a valid callback, first array member is not a valid class name or object in %s on line %d
NULL
-- Iteration 14 --
Warning: array_filter() expects parameter 2 to be a valid callback, first array member is not a valid class name or object in %s on line %d

View File

@ -141,11 +141,11 @@ Warning: array_map() expects parameter 1 to be a valid callback, array must have
NULL
-- Iteration 17 --
Warning: array_map() expects parameter 1 to be a valid callback, second array member is not a valid method in %s on line %d
Warning: array_map() expects parameter 1 to be a valid callback, first array member is not a valid class name or object in %s on line %d
NULL
-- Iteration 18 --
Warning: array_map() expects parameter 1 to be a valid callback, second array member is not a valid method in %s on line %d
Warning: array_map() expects parameter 1 to be a valid callback, first array member is not a valid class name or object in %s on line %d
NULL
-- Iteration 19 --
@ -224,11 +224,11 @@ Warning: array_map() expects parameter 1 to be a valid callback, array must have
NULL
-- Iteration 17 --
Warning: array_map() expects parameter 1 to be a valid callback, second array member is not a valid method in %s on line %d
Warning: array_map() expects parameter 1 to be a valid callback, first array member is not a valid class name or object in %s on line %d
NULL
-- Iteration 18 --
Warning: array_map() expects parameter 1 to be a valid callback, second array member is not a valid method in %s on line %d
Warning: array_map() expects parameter 1 to be a valid callback, first array member is not a valid class name or object in %s on line %d
NULL
-- Iteration 19 --

View File

@ -179,10 +179,10 @@ Warning: array_walk_recursive() expects parameter 2 to be a valid callback, arra
NULL
-- Iteration 13 --
Warning: array_walk_recursive() expects parameter 2 to be a valid callback, second array member is not a valid method in %s on line %d
Warning: array_walk_recursive() expects parameter 2 to be a valid callback, first array member is not a valid class name or object in %s on line %d
NULL
Warning: array_walk_recursive() expects parameter 2 to be a valid callback, second array member is not a valid method in %s on line %d
Warning: array_walk_recursive() expects parameter 2 to be a valid callback, first array member is not a valid class name or object in %s on line %d
NULL
-- Iteration 14 --
@ -357,10 +357,10 @@ Warning: array_walk_recursive() expects parameter 2 to be a valid callback, arra
NULL
-- Iteration 13 --
Warning: array_walk_recursive() expects parameter 2 to be a valid callback, second array member is not a valid method in %s on line %d
Warning: array_walk_recursive() expects parameter 2 to be a valid callback, first array member is not a valid class name or object in %s on line %d
NULL
Warning: array_walk_recursive() expects parameter 2 to be a valid callback, second array member is not a valid method in %s on line %d
Warning: array_walk_recursive() expects parameter 2 to be a valid callback, first array member is not a valid class name or object in %s on line %d
NULL
-- Iteration 14 --

View File

@ -179,10 +179,10 @@ Warning: array_walk() expects parameter 2 to be a valid callback, array must hav
NULL
-- Iteration 13 --
Warning: array_walk() expects parameter 2 to be a valid callback, second array member is not a valid method in %s on line %d
Warning: array_walk() expects parameter 2 to be a valid callback, first array member is not a valid class name or object in %s on line %d
NULL
Warning: array_walk() expects parameter 2 to be a valid callback, second array member is not a valid method in %s on line %d
Warning: array_walk() expects parameter 2 to be a valid callback, first array member is not a valid class name or object in %s on line %d
NULL
-- Iteration 14 --
@ -357,10 +357,10 @@ Warning: array_walk() expects parameter 2 to be a valid callback, array must hav
NULL
-- Iteration 13 --
Warning: array_walk() expects parameter 2 to be a valid callback, second array member is not a valid method in %s on line %d
Warning: array_walk() expects parameter 2 to be a valid callback, first array member is not a valid class name or object in %s on line %d
NULL
Warning: array_walk() expects parameter 2 to be a valid callback, second array member is not a valid method in %s on line %d
Warning: array_walk() expects parameter 2 to be a valid callback, first array member is not a valid class name or object in %s on line %d
NULL
-- Iteration 14 --

View File

@ -148,11 +148,11 @@ Warning: uasort() expects parameter 2 to be a valid callback, array must have ex
NULL
-- Iteration 13 --
Warning: uasort() expects parameter 2 to be a valid callback, second array member is not a valid method in %s on line %d
Warning: uasort() expects parameter 2 to be a valid callback, first array member is not a valid class name or object in %s on line %d
NULL
-- Iteration 14 --
Warning: uasort() expects parameter 2 to be a valid callback, second array member is not a valid method in %s on line %d
Warning: uasort() expects parameter 2 to be a valid callback, first array member is not a valid class name or object in %s on line %d
NULL
-- Iteration 15 --
@ -263,11 +263,11 @@ Warning: uasort() expects parameter 2 to be a valid callback, array must have ex
NULL
-- Iteration 13 --
Warning: uasort() expects parameter 2 to be a valid callback, second array member is not a valid method in %s on line %d
Warning: uasort() expects parameter 2 to be a valid callback, first array member is not a valid class name or object in %s on line %d
NULL
-- Iteration 14 --
Warning: uasort() expects parameter 2 to be a valid callback, second array member is not a valid method in %s on line %d
Warning: uasort() expects parameter 2 to be a valid callback, first array member is not a valid class name or object in %s on line %d
NULL
-- Iteration 15 --