WP-Statistics Uncaught TypeError: implode(): Argument #2 ($array) must be of type ?array, string given

WP-Statistics Uncaught TypeError: implode(): Argument #2 ($array) must be of type ?array, string given

将我的 PHP 从 7 更新为 8.0.1 后,我在 Wordpress 5.3.6

上遇到了这个错误

The Site Is Experiencing Technical Difficulties.

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

E_ERROR at line 254 /public_html/wp-content/plugins/wp-statistics/includes/vendor/whichbrowser/parser/src/Model/Version.php occured.

错误信息是:

Error Message: Uncaught TypeError: implode(): Argument #2 ($array) must be of type ?array, string given in public_html/wp-content/plugins/wp-statistics/includes/vendor/whichbrowser/parser/src/Model/Version.php:254

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

所以请帮助我。

我是这样解决这个问题的。检查此路径中的 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