Customizer page is broken
-
So my site is on 6.1.1 and the customizer page can not be opened.
I tried to deactivate all plugins and changed to twenty twenty three but unfortunately that did not help either.For some reason this only occurs on php 8 and when I change the php version to 7.4 it works just fine.
Bellow is the error that I found in the error log
Uncaught TypeError: array_merge(): Argument #3 must be of type array, bool given in ../httpdocs/pub/wp-includes/class-wp-customize-widgets.php:380 Stack trace: #0 ../httpdocs/pub/wp-includes/class-wp-customize-widgets.php(380): array_merge() #1 ../httpdocs/pub/wp-includes/class-wp-customize-widgets.php(355): WP_Customize_Widgets->customize_register() #2 ../httpdocs/pub/wp-includes/class-wp-hook.php(308): WP_Customize_Widgets->schedule_customize_register() #3 ../httpdocs/pub/wp-includes/class-wp-hook.php(332): WP_Hook->apply_filters() #4 ../httpdocs/pub/wp-includes/plugin.php(517): WP_Hook->do_action() #5 ../httpdocs/pub/wp-includes/class-wp-customize-manager.php(934): do_action() #6 ../httpdocs/pub/wp-includes/class-wp-hook.php(308): WP_Cu...', referer: https://www.bureaublaauw.com/wp-admin/options-general.php
So I tried dumping the function wp_get_sidebars_widgets() and it returns a boolean, which explains the error from array_merge. But it says on the developer resources that the functions should be returning array.
For now I have updated the code on class-wp-customize-widgets.php:380 so that the customizer page is accessible but I am afraid if the wordpress is updated that the problems will occurs again. How should I fix this?
- The topic ‘Customizer page is broken’ is closed to new replies.