From 88dde47b7a3306bccc1293d6bb5ea1e909b8299a Mon Sep 17 00:00:00 2001 From: Alexander Klimov Date: Wed, 3 Sep 2014 15:39:25 +0200 Subject: [PATCH] Foreach: add $value so that the value won't be assigned to $key refs #7060 --- library/Icinga/Protocol/File/Reader.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/library/Icinga/Protocol/File/Reader.php b/library/Icinga/Protocol/File/Reader.php index 651846b58..a9b0455b7 100644 --- a/library/Icinga/Protocol/File/Reader.php +++ b/library/Icinga/Protocol/File/Reader.php @@ -81,7 +81,7 @@ class Reader extends FilterIterator if ($matched === false) { throw new FileReaderException('Failed parsing regular expression!'); } else if ($matched === 1) { - foreach ($data as $key) { + foreach ($data as $key => $value) { if (is_int($key)) { unset($data[$key]); }