Forums
Home / Plugin: WP Code Highlight / This plugin does not support PHP7
(@hlx98007)
9 years, 3 months ago
As titled. Disable or remove this plugin with using with PHP7
(@kepicz)
9 years, 1 month ago
in file wp-code-higlight.php on line 67 just remove function preg_replace… with this:
return preg_replace_callback('/<pre(.*?)>(.*?)<\/pre>/is', function ($m) { return "<pre class=\"wp-code-highlight prettyprint$line_numbers\">".$m[2].'</pre>'; }, $content);
Problem is that wp-code-higlight is using /e modifier for regular expression which is not longer supported in PHP 7.