From d51ff983eb905bddaa7933bb461f338c0a91f892 Mon Sep 17 00:00:00 2001 From: Jonathan Goode Date: Sat, 29 Dec 2018 18:54:44 +0000 Subject: [PATCH] Maintain compatibility with older versions of PHP --- docx2md.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docx2md.php b/docx2md.php index eaa3056..37635fd 100755 --- a/docx2md.php +++ b/docx2md.php @@ -566,8 +566,8 @@ private static function mb_str_replace($search, $replace, $subject, $encoding = } } else { // Normalize $search and $replace so they are both arrays of the same length - $searches = is_array($search) ? array_values($search) : [$search]; - $replacements = is_array($replace) ? array_values($replace) : [$replace]; + $searches = is_array($search) ? array_values($search) : array($search); + $replacements = is_array($replace) ? array_values($replace) : array($replace); $replacements = array_pad($replacements, count($searches), ''); foreach ($searches as $key => $search) {