We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents b798074 + 3426a01 commit 015a119Copy full SHA for 015a119
lib/Sabberworm/CSS/Parser.php
@@ -414,9 +414,12 @@ private function parseNumericValue($bForColor = false) {
414
415
$sUnit = null;
416
foreach ($this->aSizeUnits as $iLength => &$aValues) {
417
- if(($sUnit = @$aValues[strtolower($this->peek($iLength))]) !== null) {
418
- $this->consume($iLength);
419
- break;
+ $sKey = strtolower($this->peek($iLength));
+ if(array_key_exists($sKey, $aValues)) {
+ if (($sUnit = $aValues[$sKey]) !== null) {
420
+ $this->consume($iLength);
421
+ break;
422
+ }
423
}
424
425
return new Size(floatval($sSize), $sUnit, $bForColor);
0 commit comments