Foreach: add $value so that the value won't be assigned to $key

refs #7060
This commit is contained in:
Alexander Klimov 2014-09-03 15:39:25 +02:00
parent 33669f8969
commit 88dde47b7a
1 changed files with 1 additions and 1 deletions

View File

@ -81,7 +81,7 @@ class Reader extends FilterIterator
if ($matched === false) { if ($matched === false) {
throw new FileReaderException('Failed parsing regular expression!'); throw new FileReaderException('Failed parsing regular expression!');
} else if ($matched === 1) { } else if ($matched === 1) {
foreach ($data as $key) { foreach ($data as $key => $value) {
if (is_int($key)) { if (is_int($key)) {
unset($data[$key]); unset($data[$key]);
} }