1
0
mirror of https://github.com/php/php-src.git synced 2026-03-24 08:12:21 +01:00

- MFH: Fixed detection of invalid class name

This commit is contained in:
Felipe Pena
2008-05-08 18:51:28 +00:00
parent 3725d115a8
commit 1e650ca32d
5 changed files with 6 additions and 6 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

@@ -2571,7 +2571,7 @@ ZEND_API zend_bool zend_is_callable_ex(zval *callable, uint check_flags, char **
}
} else {
if (zend_hash_num_elements(Z_ARRVAL_P(callable)) == 2) {
if (!obj) {
if (!obj || (Z_TYPE_PP(obj) != IS_STRING && Z_TYPE_PP(obj) != IS_OBJECT)) {
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

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 --

View File

@@ -147,7 +147,7 @@ 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 --