summaryrefslogtreecommitdiff
path: root/Zend/tests/bug31720.phpt
blob: 9031dec030006c701b2e56913316005edd235176 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
--TEST--
Bug #31720 (Invalid object callbacks not caught in array_walk())
--FILE--
<?php
$array = array('at least one element');

try {
    array_walk($array, array($nonesuchvar,'show'));
} catch (TypeError $e) {
    echo $e->getMessage(), "\n";
}
?>
===DONE===
--EXPECTF--
Notice: Undefined variable: nonesuchvar in %s on line %d
array_walk() expects parameter 2 to be a valid callback, first array member is not a valid class name or object
===DONE===