Skip to content

Commit

Permalink
[BUGFIX] Solved Uncaught TypeError: preg_match_all() expects paramete…
Browse files Browse the repository at this point in the history
…r 2 to be string, bool given
  • Loading branch information
lewisvoncken authored Nov 16, 2020
1 parent 6278434 commit d9dc62c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Module/I18n/Dictionary/Phrase.php
Original file line number Diff line number Diff line change
Expand Up @@ -271,7 +271,7 @@ private function getCompiledString($string)
{
$encloseQuote = $this->getQuote() == Phrase::QUOTE_DOUBLE ? Phrase::QUOTE_DOUBLE : Phrase::QUOTE_SINGLE;
/* Find all occurrences of ' and ", with no \ before it for concatenation */
preg_match_all('/[^\\\\]' . $encloseQuote . '|' . $encloseQuote . '[^\\\\]/', $string, $matches);
preg_match_all('/[^\\\\]' . $encloseQuote . '|' . $encloseQuote . '[^\\\\]/', $string ?: '', $matches);
if (count($matches[0])) {
$string = preg_replace('/([^\\\\])' . $encloseQuote . ' ?\. ?' . $encloseQuote . '/', '$1', $string);
}
Expand Down

0 comments on commit d9dc62c

Please sign in to comment.