1

I have the following error:

Warning: preg_match_all(): Unknown modifier '4' in file.php on line 410

Code on line 410:

preg_match_all("#$replacement_pattern#is", $text, $arr);

Can someone please help me to fix this problem?

Cristik
  • 30,989
  • 25
  • 91
  • 127
dawidex44
  • 11
  • 1

1 Answers1

0

The issue is caused by the pattern having an unescaped regex delimiter that is # in your case.

At line 396, the $row['bbcode_in'] is a simple string, and all # symbols can be escaped then, so that afterwards you could use # as regex delimiters.

So, Line 396 must look like:

$replacement_pattern = str_replace('#', '\\#', trim($row['bbcode_in']));
Wiktor Stribiżew
  • 607,720
  • 39
  • 448
  • 563