From 81d613bc4dcc2233bc041ab96f00438b41d7fd43 Mon Sep 17 00:00:00 2001 From: troosan Date: Wed, 10 Feb 2021 08:25:09 +0100 Subject: [PATCH] php 5.3 compatible code --- src/PhpWord/Shared/Html.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/PhpWord/Shared/Html.php b/src/PhpWord/Shared/Html.php index 3ad8fca9..659298ff 100644 --- a/src/PhpWord/Shared/Html.php +++ b/src/PhpWord/Shared/Html.php @@ -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 = '';