mirror of
https://github.com/php/php-src.git
synced 2024-12-01 05:43:38 +08:00
19 lines
351 B
PHP
19 lines
351 B
PHP
--TEST--
|
|
Bug #29566 (foreach/string handling strangeness)
|
|
--FILE--
|
|
<?php
|
|
$var="This is a string";
|
|
|
|
$dummy="";
|
|
unset($dummy);
|
|
|
|
foreach($var['nosuchkey'] as $v) {
|
|
}
|
|
?>
|
|
===DONE===
|
|
--EXPECTF--
|
|
Warning: Illegal string offset 'nosuchkey' in %sbug29566.php on line %d
|
|
|
|
Warning: Invalid argument supplied for foreach() in %sbug29566.php on line %d
|
|
===DONE===
|