Skip to content

Commit 5fa61b6

Browse files
authored
Merge pull request #50 from msch-alpgis/master
Fix styles for php >= 7.0
2 parents a3c3a5b + aaf9bfe commit 5fa61b6

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/Svg/Style.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -302,15 +302,15 @@ static function getTriplet($color, $percent = false) {
302302

303303
if ($percent) {
304304
if ($triplet[$c][strlen($triplet[$c]) - 1] === "%") {
305-
$triplet[$c] = $triplet[$c] / 100;
305+
$triplet[$c] = floatval($triplet[$c]) / 100;
306306
}
307307
else {
308308
$triplet[$c] = $triplet[$c] / 255;
309309
}
310310
}
311311
else {
312312
if ($triplet[$c][strlen($triplet[$c]) - 1] === "%") {
313-
$triplet[$c] = round($triplet[$c] * 2.55);
313+
$triplet[$c] = round(floatval($triplet[$c]) * 2.55);
314314
}
315315
}
316316
}
@@ -547,4 +547,4 @@ static function convertSize($size, $referenceSize = 11.0, $dpi = 96.0) {
547547
'whitesmoke' => '#f5f5f5',
548548
'yellowgreen' => '#9acd32',
549549
);
550-
}
550+
}

0 commit comments

Comments
 (0)