【问题标题】:Wordpress plugin makes website error: crayon-syntax-highlighterWordpress 插件使网站出错:crayon-syntax-highlighter
【发布时间】:2022-10-05 00:25:06
【问题描述】:

当我启用插件“crayon-syntax-highlighter”版本 2.8.4 时,我的网站在每个页面中都没有显示任何内容。

- -错误信息: - -

Fatal error: Uncaught Error: Call to a member function id() on array in 
/var/www/it/wp-content/plugins/
crayon-syntax-highlighter/crayon_formatter.class.php:36

【问题讨论】:

    标签: wordpress


    【解决方案1】:

    尝试修改此文件:crayon_langs.class.php

    文件位置:/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php

    去线# 340

    [前]

    return preg_replace('/[^w-+#]/msi', '', $id);
    

    需要在w后面加一个''

    [后]

    return preg_replace('/[^w-+#]/msi', '', $id);
    

    参考https://crunchify.com/fix-for-crayon-syntax-highlighter-wordpress-plugin-and-php-7-3-fatal-error

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2021-04-15
      • 1970-01-01
      • 2022-11-30
      • 2021-03-10
      • 1970-01-01
      • 2022-06-10
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多