Support » Plugin: Crayon Syntax Highlighter » php7.3.0rc1 errors in PHP Warning: preg_replace():

  • url:http://localhost:8086/wp-login.php
    in php7.3.0rc1 errors PHP Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in G:\w\w\f\wp-content\plugins\crayon-syntax-highlighter\crayon_langs.class.php on line 340
    the content:

    	// Override
    	function clean_id($id) {
            $id = CrayonUtil::space_to_hyphen( strtolower(trim($id)) );
            return preg_replace('/[^\w-+#]/msi', '', $id);
    	}
    • This topic was modified 2 years, 2 months ago by finip.
Viewing 12 replies - 1 through 12 (of 12 total)
  • I tried to block this error, and I could login and exit the background. But the problem remains. When you open an article or page with a highlighted snippet of code, the error is more specific.
    url:http://localhost:8086/2015/07/25/my-site-has-multiple-versions-of-php-iis8-5-web-config-functionality.shtml
    PHP Fatal error: Uncaught Error: Call to a member function id() on array in G:\w\w\f\wp-content\plugins\crayon-syntax-highlighter\crayon_formatter.class.php:36 Stack trace: #0 G:\w\w\f\wp-content\plugins\crayon-syntax-highlighter\crayon_formatter.class.php(538): CrayonFormatter::format_code('', Array, Object(CrayonHighlighter)) #1 [internal function]: CrayonFormatter::delim_to_internal(Array) #2 G:\w\w\f\wp-content\plugins\crayon-syntax-highlighter\crayon_formatter.class.php(516): preg_replace_callback('#()#msi', 'CrayonFormatter...', '2015 x64\r\n2012 ...') #3 G:\w\w\f\wp-content\plugins\crayon-syntax-highlighter\crayon_highlighter.class.php(166): CrayonFormatter::format_mixed_code('2015 x64\r\n2012 ...', Object(CrayonLang), Object(CrayonHighlighter)) #4 G:\w\w\f\wp-content\plugins\crayon-syntax-highlighter\crayon_highlighter.class.php(186): CrayonHighlighter->process() #5 G:\w\w\f\wp-content\plugins\crayon-syntax-highlighter\crayon_wp.class.php(698): CrayonHighlighter->output(true, false) #6 G:\w\w\f\wp-includes\class-wp-ho in G:\w\w\f\wp-content\plugins\crayon-syntax-highlighter\crayon_formatter.class.php on line 36
    Obviously this is the format that is not recognized during regular coding or conversion, but I am not sure if this is the reason. Because I can no longer go further to analyze specific code compatibility issues.

    • This reply was modified 2 years, 2 months ago by finip.

    I have the exact same error after the update to PHP 7.3.0. Searching for a solution as this plugin has not been updated in 3 latest releases.

    • This reply was modified 1 year, 11 months ago by Syxguns.

    Hi @finip and @syxguns – could you try giving version 2.8.6 a try?

    We noticed the same issue on our staging site and fixed above bug.

    More details and download steps: https://crunchify.com/fix-for-crayon-syntax-highlighter-wordpress-plugin-and-php-7-3-fatal-error/

    It’s running fine on Crunchify now without any issue with PHP 7.3.1.

    @crunchify thanks very much.
    but this problem has been solved two months ago, and I haven’t responded to this post. by the way, you can see my reply to you yesterday. you have to find the error location.

    You are welcome @finip.

    Yeah – checking other reply.

    Is there a specific reason why version 2.8.6 is not the latest version available on wordpress.org so that sites using the plugin update automatically?

    Hi @jackdewey thanks for your concern.

    That’s because, I’m not owning plugin in WP repository.

    Is there any way to get ownership of this plugin? I guess yes, @wordpress team can help add me as an owner here?

    Yes there is. Process is here.

    https://developer.wordpress.org/plugins/wordpress-org/take-over-an-existing-plugin/

    I think he has moved away from WordPress so may be open to someone taking it on.

    https://github.com/aramk

    Thank you @borpin2. Sent an email to WordPress Plugin team with all details.

    Great. It would be fab if someone could take it on.

    Note the instructions say you need to have made an attempt to contact the owner/author directly first.

    If you need any admin help, I’m happy to help – the PHP and CSS is beyond me (mostly).

    @crunchify
    i haven’t seen any information about the author of this plugin in years, not even a little. the problem now is that if you want to take over the plugin, the only way to do so is to submit the takeover information to the authorities along with your best plugin code.

    The author is easily found on GitHub. Still active there just not with this Plugin.

Viewing 12 replies - 1 through 12 (of 12 total)
  • The topic ‘php7.3.0rc1 errors in PHP Warning: preg_replace():’ is closed to new replies.