xwp / stream

🗄️ Stream plugin for WordPress
https://wordpress.org/plugins/stream/
GNU General Public License v2.0
405 stars 119 forks source link

PHP 8.1: Unable to access widgets screen #1418

Closed dd32 closed 3 days ago

dd32 commented 1 year ago

Bug Report

Fatal error: Uncaught Error: array_merge() does not accept unknown named parameters
in wp-content/plugins/stream/connectors/class-connector-widgets.php on line 300

Call stack:
array_merge()
call_user_func_array()
wp-content/plugins/stream/connectors/class-connector-widgets.php:300
WP_Stream\Connector_Widgets::handle_widget_removal()
wp-content/plugins/stream/connectors/class-connector-widgets.php:178
WP_Stream\Connector_Widgets::handle_sidebars_widgets_changes()
wp-content/plugins/stream/connectors/class-connector-widgets.php:144
WP_Stream\Connector_Widgets::callback_update_option_sidebars_widgets()
call_user_func_array()
wp-content/plugins/stream/classes/class-connector.php:127
WP_Stream\Connector::callback()
wp-includes/class-wp-hook.php:308
WP_Hook::apply_filters()
wp-includes/class-wp-hook.php:332
WP_Hook::do_action()
wp-includes/plugin.php:517
do_action()
wp-includes/option.php:570
update_option()
wp-includes/widgets.php:1090
wp_set_sidebars_widgets()
wp-includes/widgets.php:1357
retrieve_widgets()
wp-includes/rest-api/endpoints/class-wp-rest-sidebars-controller.php:298
WP_REST_Sidebars_Controller::retrieve_widgets()
wp-includes/rest-api/endpoints/class-wp-rest-sidebars-controller.php:97
WP_REST_Sidebars_Controller::get_items_permissions_check()
wp-includes/rest-api/class-wp-rest-server.php:1148
WP_REST_Server::respond_to_request()
wp-includes/rest-api/class-wp-rest-server.php:1028
WP_REST_Server::dispatch()
wp-includes/rest-api.php:535
rest_do_request()
wp-includes/rest-api.php:2889
rest_preload_api_request()
array_reduce()
wp-includes/block-editor.php:634
block_editor_rest_api_preload()
wp-admin/widgets-form-blocks.php:26
require()
wp-admin/widgets.php:32

Expected Behavior

Describe what should happen.

Actual Behavior

Describe what actually happens.

Steps to Reproduce the Problem

1. 2. 3.

Screenshots

Screenshot 2023-03-28 at 3 17 38 pm

Drag and drop screenshots in this area that help illustrate the problem.

System Information

kasparsd commented 1 year ago

Possibly related to #1355 and #1294.

tharsheblows commented 3 days ago

Completed in https://github.com/xwp/stream/pull/1422