Skip to content

Commit 81d613b

Browse files
committed
php 5.3 compatible code
1 parent 4840faa commit 81d613b

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/PhpWord/Shared/Html.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -717,7 +717,8 @@ protected static function parseStyle($attribute, $styles)
717717
// Word does not accept shortened hex colors e.g. #CCC, only full e.g. #CCCCCC
718718
if (preg_match('/([0-9]+[^0-9]*)\s+(\#[a-fA-F0-9]+|[a-zA-Z]+)\s+([a-z]+)/', $cValue, $matches)) {
719719
if (false !== strpos($cKey, '-')) {
720-
$which = explode('-', $cKey)[1];
720+
$tmp = explode('-', $cKey);
721+
$which = $tmp[1];
721722
$which = ucfirst($which); // e.g. bottom -> Bottom
722723
} else {
723724
$which = '';

0 commit comments

Comments
 (0)