From cd49391833f40803a16b20ff93414b07b9aa8d4c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Elan=20Ruusam=C3=A4e?= Date: Wed, 20 Jan 2016 15:41:56 +0200 Subject: [PATCH] cosmetic also comment why the check may be neccessary --- lib/Minify/HTML/Helper.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/lib/Minify/HTML/Helper.php b/lib/Minify/HTML/Helper.php index 88536e5..e905e88 100644 --- a/lib/Minify/HTML/Helper.php +++ b/lib/Minify/HTML/Helper.php @@ -121,9 +121,13 @@ class Minify_HTML_Helper { $gc = (require $this->groupsConfigFile); $keys = explode(',', $key); foreach ($keys as $key) { - if (isset($gc[$key])) { - $this->_lastModified = self::getLastModified($gc[$key], $this->_lastModified); + if (!isset($gc[$key])) { + // this can happen if value is null + // which could be solved with array_filter + continue; } + + $this->_lastModified = self::getLastModified($gc[$key], $this->_lastModified); } } }