crayon-syntax-highlighter
crayon-syntax-highlighter copied to clipboard
PHP 7.3 issue / fix: preg_replace(): Compilation failed: invalid range
crayon_langs.class.php Line 340:
return preg_replace('/[^\w-+#]/msi', '', $id); becomes return preg_replace('/[^\w-+#]/msi', '', $id);
Regards Alex
PR will fix it: Fix compatibility with PHP 7.3 #451
I got the following just now too:
[12-May-2020 19:12:22 UTC] PHP Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in ***/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340
This project is defunct; switch to Urvanov Syntax Highlighter (Github here) which is Crayon brought up to date.