]> granicus.if.org Git - php/commitdiff
add test for the last Dmitry's fix
authorAntony Dovgal <tony2001@php.net>
Thu, 4 Aug 2005 14:12:07 +0000 (14:12 +0000)
committerAntony Dovgal <tony2001@php.net>
Thu, 4 Aug 2005 14:12:07 +0000 (14:12 +0000)
Zend/tests/foreach_undefined.phpt [new file with mode: 0644]

diff --git a/Zend/tests/foreach_undefined.phpt b/Zend/tests/foreach_undefined.phpt
new file mode 100644 (file)
index 0000000..101d983
--- /dev/null
@@ -0,0 +1,14 @@
+--TEST--
+foreach() & undefined var
+--FILE--
+<?php
+
+foreach($a as $val);
+
+echo "Done\n";
+?>
+--EXPECTF--    
+Notice: Undefined variable: a in %s on line %d
+
+Warning: Invalid argument supplied for foreach() in %s on line %d
+Done