[wp-trac] [WordPress Trac] #51949: Error after switching themes on wordpress

WordPress Trac noreply at wordpress.org
Sun Dec 6 16:31:30 UTC 2020


#51949: Error after switching themes on wordpress
--------------------------+-----------------------------
 Reporter:  pranav1326    |      Owner:  (none)
     Type:  defect (bug)  |     Status:  new
 Priority:  normal        |  Milestone:  Awaiting Review
Component:  General       |    Version:
 Severity:  critical      |   Keywords:
  Focuses:                |
--------------------------+-----------------------------
 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.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/51949>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list