#51949 closed defect (bug) (duplicate)
Error after switching themes on wordpress
Reported by: | pranav1326 | Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | critical | Version: | |
Component: | Widgets | Keywords: | php8 reporter-feedback |
Focuses: | Cc: |
Description (last modified by )
When I try to switch a theme this error happens. And after this error whole, WordPress is not working or even opening. I have uninstalled and reinstalled WordPress once but the same thing happened. I searched on google and I find out this is because of PHP version 8.
Fatal error: Uncaught ArgumentCountError: array_merge() does not accept unknown named parameters in C:\xampp\htdocs\wordpress\wp-includes\widgets.php:1265 Stack trace: #0 C:\xampp\htdocs\wordpress\wp-includes\widgets.php(1265): array_merge(wp_inactive_widgets: Array, sidebar-1: Array, footer-1: Array, footer-2: Array, footer-3: Array) #1 C:\xampp\htdocs\wordpress\wp-includes\widgets.php(1220): retrieve_widgets(true) #2 C:\xampp\htdocs\wordpress\wp-includes\class-wp-hook.php(289): _wp_sidebars_changed('Twenty Twenty') #3 C:\xampp\htdocs\wordpress\wp-includes\class-wp-hook.php(311): WP_Hook->apply_filters(NULL, Array) #4 C:\xampp\htdocs\wordpress\wp-includes\plugin.php(478): WP_Hook->do_action(Array) #5 C:\xampp\htdocs\wordpress\wp-includes\theme.php(3267): do_action('after_switch_th...', 'Twenty Twenty', Object(WP_Theme)) #6 C:\xampp\htdocs\wordpress\wp-includes\class-wp-hook.php(287): check_theme_switched() #7 C:\xampp\htdocs\wordpress\wp-includes\class-wp-hook.php(311): WP_Hook->apply_filters(NULL, Array) #8 C:\xampp\htdocs\wordpress\wp-includes\plugin.php(478): WP_Hook->do_action(Array) #9 C:\xampp\htdocs\wordpress\wp-settings.php(546): do_action('init') #10 C:\xampp\htdocs\wordpress\wp-config.php(90): require_once('C:\xampp\htdocs...') #11 C:\xampp\htdocs\wordpress\wp-load.php(37): require_once('C:\xampp\htdocs...') #12 C:\xampp\htdocs\wordpress\wp-blog-header.php(13): require_once('C:\xampp\htdocs...') #13 C:\xampp\htdocs\wordpress\index.php(17): require('C:\xampp\htdocs...') #14 {main} thrown in C:\xampp\htdocs\wordpress\wp-includes\widgets.php on line 1265
There has been a critical error on your website.
Change History (8)
#2
follow-up:
↓ 7
@
4 years ago
- Description modified (diff)
- Keywords php8 added
Hello @pranav1326 and Welcome to Trac!
Thank you for reporting this issue.
Are you running WordPress 5.6 RC4? If no, what version of WordPress is running on your website?
#3
@
4 years ago
Ticket #50913 with changeset 48839 added a PHP 8 fix for ArgumentCountError: array_merge() does not accept unknown named parameters
in includes/widgets.php
.
#5
@
4 years ago
Can reproduce the exact fatal error when running PHP 8 with WP 5.5.3.
Cannot reproduce when running PHP 8 with WP 5.6 RC4.
#6
@
4 years ago
- Component changed from General to Widgets
- Milestone Awaiting Review deleted
- Resolution set to duplicate
- Status changed from new to closed
Hi there, welcome to WordPress Trac! Thanks for the report.
As noted above, this was fixed in [48839] / #50913.
For some context, WordPress 5.5 was released in August, and PHP 8.0 only a week ago.
WordPress 5.6 (coming up on December 8) is the first version that aims for (beta) compatibility with PHP 8.0.
#7
in reply to:
↑ 2
@
4 years ago
Replying to hellofromTonya:
Hello @pranav1326 and Welcome to Trac!
Thank you for reporting this issue.
Are you running WordPress 5.6 RC4? If no, what version of WordPress is running on your website?
I am using currently WordPress version 5.5.3
Hi @pranav1326,
Thanks for the reporting this and welcome to WordPress Trac. I am reviewing it.
Thank you,
Deb