Skip to content

Commit

Permalink
Maintain compatibility with older versions of PHP
Browse files Browse the repository at this point in the history
  • Loading branch information
u01jmg3 committed Dec 29, 2018
1 parent 11d4e88 commit d51ff98
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions docx2md.php
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

1 comment on commit d51ff98

@u01jmg3
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Relates to db85306

Please sign in to comment.