Open gpahlevanzadeh opened 4 years ago
Please use the following plugin. It’s a fork of crayon syntax highligther.
I have been using it for a while and I don’t have issues.
If you do have problems, let the developer know on the support page of the plugin.
I setup a new httpd server and run my wordpress, I use crayon-syntax-highlighter plugin. And I get the following log in httpd.log:
[Mon May 11 08:35:02.022663 2020] [php7:error] [pid 82334] [client 88.198.44.37:39298] PHP Fatal error: Uncaught Error: Call to a member function id() on array in /usr/local/www/apache24/data/wp-content/plugins/crayon-syntax-highlighter/crayon_formatter.class.php:36\nStack trace:\n#0 /usr/local/www/apache24/data/wp-content/plugins/crayon-syntax-highlighter/crayon_formatter.class.php(538): CrayonFormatter::format_code()\n#1 [internal function]: CrayonFormatter::delim_to_internal()\n#2 /usr/local/www/apache24/data/wp-content/plugins/crayon-syntax-highlighter/crayon_formatter.class.php(516): preg_replace_callback()\n#3 /usr/local/www/apache24/data/wp-content/plugins/crayon-syntax-highlighter/crayon_highlighter.class.php(166): CrayonFormatter::format_mixed_code()\n#4 /usr/local/www/apache24/data/wp-content/plugins/crayon-syntax-highlighter/crayon_highlighter.class.php(186): CrayonHighlighter->process()\n#5 /usr/local/www/apache24/data/wp-content/plugins/crayon-syntax-highlighter/crayon_wp.class.php(703): CrayonHighlighter->output()\n#6 /usr/local/www/apache24/data/wp-includes/class-wp-hook.php(287): CrayonWP::the_content() in /usr/local/www/apache24/data/wp-content/plugins/crayon-syntax-highlighter/crayon_formatter.class.php on line 36
How can I solve it?