summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rwxr-xr-xtests/lang/bug29566.phpt16
1 files changed, 16 insertions, 0 deletions
diff --git a/tests/lang/bug29566.phpt b/tests/lang/bug29566.phpt
new file mode 100755
index 0000000000..7fdd3ff4ec
--- /dev/null
+++ b/tests/lang/bug29566.phpt
@@ -0,0 +1,16 @@
+--TEST--
+Bug #29566 (foreach/string handling strangeness)
+--FILE--
+<?
+$var="This is a string";
+
+$dummy="";
+unset($dummy);
+
+foreach($var['nosuchkey'] as $v) {
+}
+?>
+===DONE===
+--EXPECTF--
+Warning: Invalid argument supplied for foreach() in %sbug29566.php on line %d
+===DONE===