I recently upgraded my dedicated server to Apache 2.4.6, MySQL 5.5.32, and PHP 5.4.21. Now on my website I get this error:
Warning: preg_replace(): Compilation failed: unknown option bit(s) set at offset -1 in /home/champion/public_html/wp-includes/shortcodes.php on line 295
Here is the code from shortcodes.php on line 295:
$text = preg_replace("/[x{00a0}x{200b}]+/u", " ", $text);
Is the preg_replace function not compatible with the new PHP 5.4.21?
Updating the PCRE version to 8.21 has fixed the problem.