Fatal error: Uncaught TypeError: array_merge()
-
Hey all! I’ve hit a weird one. I built a site and theme on one environment (Ionos) and then moved it to another (GoDaddy). Settings are all the same. PHP 8.0, WordPress 6.4.3…but on the live site, the sidebars and widgets don’t show on the front end and on the admin side, the widget page can be accessed, but none of my registered sidebars show. Also, the customizer page, if accessed, throws a critical error (pasted below).
Please note that I have switched themes and deactivated plugins. The critical error still exists and the sidebars still don’t show.
Fatal error: Uncaught TypeError: array_merge(): Argument #3 must be of type array, bool given in /var/www/wp-includes/class-wp-customize-widgets.php:380
Stack trace:
0 /var/www/wp-includes/class-wp-customize-widgets.php(380): array_merge(Array, Array, false)
1 /var/www/wp-includes/class-wp-customize-widgets.php(355): WP_Customize_Widgets->customize_register()
2 /var/www/wp-includes/class-wp-hook.php(324): WP_Customize_Widgets->schedule_customize_register(Object(WP_Customize_Manager))
3 /var/www/wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters(”, Array)
4 /var/www/wp-includes/plugin.php(517): WP_Hook->do_action(Array)
5 /var/www/wp-includes/class-wp-customize-manager.php(942): do_action(‘customize_regis…’, Object(WP_Customize_Manager))
6 /var/www/wp-includes/class-wp-hook.php(324): WP_Customize_Manager->wp_loaded(”)
7 /var/www/wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters(NULL, Array)
8 /var/www/wp-includes/plugin.php(517): WP_Hook->do_action(Array)
9 /var/www/wp-settings.php(665): do_action(‘wp_loaded’)
10 /var/www/wp-config.php(112): require_once(‘/var/www/wp-set…’)
11 /var/www/wp-load.php(50): require_once(‘/var/www/wp-con…’)
12 /var/www/wp-admin/admin.php(34): require_once(‘/var/www/wp-loa…’)
13 /var/www/wp-admin/customize.php(13): require_once(‘/var/www/wp-adm…’)
14 {main} thrown in /var/www/wp-includes/class-wp-customize-widgets.php on line 380Here’s the segment of code from class-wp-customize-widgets.php:
$sidebars_widgets = array_merge( array( 'wp_inactive_widgets' => array() ), array_fill_keys( array_keys( $wp_registered_sidebars ), array() ), wp_get_sidebars_widgets() );
The page I need help with: [log in to see the link]
- You must be logged in to reply to this topic.