php 5.3 compatible code

This commit is contained in:
troosan 2021-02-10 08:25:09 +01:00
parent 4840faa422
commit 81d613bc4d
1 changed files with 2 additions and 1 deletions

View File

@ -717,7 +717,8 @@ class Html
// Word does not accept shortened hex colors e.g. #CCC, only full e.g. #CCCCCC
if (preg_match('/([0-9]+[^0-9]*)\s+(\#[a-fA-F0-9]+|[a-zA-Z]+)\s+([a-z]+)/', $cValue, $matches)) {
if (false !== strpos($cKey, '-')) {
$which = explode('-', $cKey)[1];
$tmp = explode('-', $cKey);
$which = $tmp[1];
$which = ucfirst($which); // e.g. bottom -> Bottom
} else {
$which = '';