Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes #1294 widget connector php 8 incompatibility #1355

Merged
merged 1 commit into from
Aug 23, 2022

Conversation

ParhamG
Copy link
Contributor

@ParhamG ParhamG commented Aug 23, 2022

Fixes #1294

The widget connector throws PHP fatal errors on widget add/remove on PHP 8.x:
PHP Fatal error: Uncaught ArgumentCountError: array_merge() does not accept unknown named parameters in /wp-content/plugins/stream/connectors/class-connector-widgets.php:300

This update fixes the issue by applying array_values() on the arguments before passing them to array_merge()/call_user_func_array().

Checklist

  • Project documentation has been updated to reflect the changes in this pull request, if applicable.
  • I have tested the changes in the local development environment (see contributing.md).
  • I have added phpunit tests.

Fixes the widget connector throwing fatal errors on widget add/remove on PHP 8.x
Copy link
Contributor

@kasparsd kasparsd left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for the pull request @ParhamG!

Looks like several users experiencing the same issue have tested the patch and reported that it works fine.

@kasparsd kasparsd merged commit d4f3503 into xwp:develop Aug 23, 2022
@kasparsd kasparsd mentioned this pull request Aug 23, 2022
7 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[PHP 8] Error when updating widgets.
2 participants