【问题标题】:I just installed Xampp and downloaded the recent Wordpress. I tried changing any theme but I get the error below我刚刚安装了 Xampp 并下载了最近的 Wordpress。我尝试更改任何主题,但出现以下错误
【发布时间】:2021-03-17 13:46:42
【问题描述】:

致命错误:未捕获的 ArgumentCountError:array_merge() 不接受 C:\xampp\htdocs\wp-includes\widgets.php:1265 中的未知命名参数 堆栈跟踪:#0 C:\xampp\htdocs\wp-includes \widgets.php(1265): array_merge(wp_inactive_widgets: Array, sidebar-1: Array) #1 C:\xampp\htdocs\wp-includes\widgets.php(1220): retrieve_widgets(true) #2 C:\xampp \htdocs\wp-includes\class-wp-hook.php(289): _wp_sidebars_changed('Twenty Twenty') #3 C:\xampp\htdocs\wp-includes\class-wp-hook.php(311): WP_Hook ->apply_filters(NULL, Array) #4 C:\xampp\htdocs\wp-includes\plugin.php(478): WP_Hook->do_action(Array) #5 C:\xampp\htdocs\wp-includes\theme。 php(3267): do_action('after_switch_th...', '二十二十', Object(WP_Theme)) #6 C:\xampp\htdocs\wp-includes\class-wp-hook.php(287): check_theme_switched( '') #7 C:\xampp\htdocs\wp-includes\class-wp-hook.php(311): WP_Hook->apply_filters(NULL, Array) #8 C:\xampp\htdocs\wp-includes\plugin .php(478): WP_Hook->do_action(Array) #9 C:\xampp\htdocs\wp-settings.php(546): do_action('init') #10 C:\xampp\htdocs\wp-config.php(90): require_once('C:\xampp\htdocs...') #11 C:\xampp\htdocs\wp-load .php(37): require_once('C:\xampp\htdocs...') #12 C:\xampp\htdocs\wp-blog-header.php(13): require_once('C:\xampp\htdocs. ..') #13 C:\xampp\htdocs\index.php(17): require('C:\xampp\htdocs...') #14 {main} 在 C:\xampp\htdocs\wp- 中抛出在第 1265 行包含\widgets.php

【问题讨论】:

    标签: wordpress wordpress-theming


    【解决方案1】:

    有同样的问题。 谷歌搜索显示,在过去的几天里,许多其他人也遇到了同样的问题。 问题似乎是 WordPress 与 XAMPP 附带的新 PHP 8.0.0 版本不兼容。 目前的解决方案是卸载 XAMPP 并下载一个较旧的版本(PHP 7.4.13)。可以上这里:https://www.apachefriends.org/xampp-files/7.4.13/xampp-windows-x64-7.4.13-0-VC15-installer.exe

    来源:https://make.wordpress.org/core/2020/11/23/wordpress-and-php-8-0/

    https://wordpress.org/support/topic/error-on-setting-up-any-theme/

    https://github.com/woocommerce/woocommerce/issues/28327

    【讨论】:

    • 谢谢!降级到 PHP 7.4.3 并且运行良好。
    猜你喜欢
    • 2015-05-02
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2020-11-22
    • 1970-01-01
    • 2015-03-08
    • 2022-05-26
    • 1970-01-01
    相关资源
    最近更新 更多