diff --git a/lib/Sabberworm/CSS/Parser.php b/lib/Sabberworm/CSS/Parser.php index 6a9ca081..fd9f7bca 100644 --- a/lib/Sabberworm/CSS/Parser.php +++ b/lib/Sabberworm/CSS/Parser.php @@ -414,9 +414,12 @@ private function parseNumericValue($bForColor = false) { $sUnit = null; foreach ($this->aSizeUnits as $iLength => &$aValues) { - if(($sUnit = @$aValues[strtolower($this->peek($iLength))]) !== null) { - $this->consume($iLength); - break; + $sKey = strtolower($this->peek($iLength)); + if(array_key_exists($sKey, $aValues)) { + if (($sUnit = $aValues[$sKey]) !== null) { + $this->consume($iLength); + break; + } } } return new Size(floatval($sSize), $sUnit, $bForColor);