Reputation: 19
I just installed Xampp and downloaded the latest version of Wordpress.
I tried changing any theme but I get the error below:
Fatal error: Uncaught ArgumentCountError: array_merge() does not accept unknown named parameters in C:\xampp\htdocs\wp-includes\widgets.php:1265
Stack trace:
#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...', 'Twenty Twenty', 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} thrown in C:\xampp\htdocs\wp-includes\widgets.php on line 1265
Upvotes: 0
Views: 4991
Reputation: 127
Having the same issue. Googling it shows that many other had the same issue in the last couple of days. The problem seems to be that WordPress incompatible with the new PHP 8.0.0 version that comes with XAMPP. The solution, for now, will be to uninstall XAMPP and download one version older (PHP 7.4.13). Can get on here: https://www.apachefriends.org/xampp-files/7.4.13/xampp-windows-x64-7.4.13-0-VC15-installer.exe
Source: 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
Upvotes: 4