]> granicus.if.org Git - php/commitdiff
test for Bug #31720
authorStanislav Malyshev <stas@php.net>
Wed, 2 Feb 2005 10:31:53 +0000 (10:31 +0000)
committerStanislav Malyshev <stas@php.net>
Wed, 2 Feb 2005 10:31:53 +0000 (10:31 +0000)
Zend/tests/bug31720.phpt [new file with mode: 0644]

diff --git a/Zend/tests/bug31720.phpt b/Zend/tests/bug31720.phpt
new file mode 100644 (file)
index 0000000..be57ca2
--- /dev/null
@@ -0,0 +1,16 @@
+--TEST--
+Bug #31720 (Invalid object callbacks not caught in array_walk())
+--FILE--
+<?
+$array = array('at least one element');
+
+array_walk($array, array($nonesuchvar,'show'));
+?>
+===DONE===
+--EXPECTF--
+Notice: Undefined variable: nonesuchvar in %s on line %d
+
+Notice: Non-callable array passed to zend_call_function() in %s on line %d
+
+Warning: array_walk(): Unable to call Array() - function does not exist in %s on line %d
+===DONE===