Skip to content

Commit 015a119

Browse files
committed
Merge pull request MyIntervals#97 from sivig/master
fix php notice
2 parents b798074 + 3426a01 commit 015a119

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

lib/Sabberworm/CSS/Parser.php

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -414,9 +414,12 @@ private function parseNumericValue($bForColor = false) {
414414

415415
$sUnit = null;
416416
foreach ($this->aSizeUnits as $iLength => &$aValues) {
417-
if(($sUnit = @$aValues[strtolower($this->peek($iLength))]) !== null) {
418-
$this->consume($iLength);
419-
break;
417+
$sKey = strtolower($this->peek($iLength));
418+
if(array_key_exists($sKey, $aValues)) {
419+
if (($sUnit = $aValues[$sKey]) !== null) {
420+
$this->consume($iLength);
421+
break;
422+
}
420423
}
421424
}
422425
return new Size(floatval($sSize), $sUnit, $bForColor);

0 commit comments

Comments
 (0)