【问题标题】:WP-Statistics Uncaught TypeError: implode(): Argument #2 ($array) must be of type ?array, string givenWP-Statistics Uncaught TypeError: implode(): Argument #2 ($array) must be of type ?array, string given
【发布时间】:2021-05-05 22:22:57
【问题描述】:

在将我的 PHP 从 7 更新到 8.0.1 后,我在 Wordpress 5.3.6 上遇到了这个错误

网站遇到技术难题。

检查我的电子邮件收件箱后,我收到了这个错误:

E_ERROR 在第 254 行 /public_html/wp-content/plugins/wp-statistics/includes/vendor/whichbrowser/parser/src/Model/Version.php 发生。

错误信息是:

错误消息:未捕获的类型错误:implode():参数 #2 ($array) 必须是 ?array 类型,字符串在 public_html/wp-content/plugins/wp-statistics/includes/vendor/whichbrowser/parser/ 中给出src/Model/Version.php:254

问题似乎出在WP-Statistics 插件上,但该插件没有更新。

所以请帮帮我。

【问题讨论】:

    标签: php wordpress php-8


    【解决方案1】:

    我以这种方式解决了这个问题。检查此路径中的Version.php 文件:

    /public_html/wp-content/plugins/wp-statistics/includes/vendor/whichbrowser/parser/src/Model/Version.php
    

    直播上254我刚换了:

    $version .= implode($v, '.');
    

    $version .= implode('.',$v);
    

    现在问题已解决,我的网站在 PHP 8 上运行

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2022-11-20
      • 1970-01-01
      • 2018-05-02
      • 2023-02-25
      • 1970-01-01
      • 2016-11-13
      • 2016-05-02
      • 2021-11-23
      相关资源
      最近更新 更多