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

Remove pass by reference of the $scripts and $styles attributes in client-assets.php #21987

Merged
merged 1 commit into from
May 1, 2020
Merged

Remove pass by reference of the $scripts and $styles attributes in client-assets.php #21987

merged 1 commit into from
May 1, 2020

Conversation

dingo-d
Copy link
Member

@dingo-d dingo-d commented Apr 30, 2020

Description

This removal fixes the warnings thrown while using the plugin:

Warning: Parameter 1 to gutenberg_register_vendor_scripts() expected to be a reference, value given in /wp-includes/class-wp-hook.php on line 287
Warning: Parameter 1 to gutenberg_register_packages_scripts() expected to be a reference, value given in /wp-includes/class-wp-hook.php on line 287
Warning: Parameter 1 to gutenberg_register_packages_styles() expected to be a reference, value given in /wp-includes/class-wp-hook.php on line 287

It could be related to https://core.trac.wordpress.org/ticket/44979 which was fixed in WP 5.4, so it should be removed in the plugin as well.

How has this been tested?

I've changed this in my local installation, and the warnings were gone.

Types of changes

Bug fix

Checklist:

  • My code is tested (manually).
  • My code follows the WordPress code style.
  • My code follows the accessibility standards.
  • My code has proper inline documentation.
  • I've included developer documentation if appropriate.
  • I've updated all React Native files affected by any refactorings/renamings in this PR.

This removal fixes the warnings thrown while using the plugin:

```
Warning: Parameter 1 to gutenberg_register_vendor_scripts() expected to be a reference, value given in /wp-includes/class-wp-hook.php on line 287
Warning: Parameter 1 to gutenberg_register_packages_scripts() expected to be a reference, value given in /wp-includes/class-wp-hook.php on line 287
Warning: Parameter 1 to gutenberg_register_packages_styles() expected to be a reference, value given in /wp-includes/class-wp-hook.php on line 287
```

It could be related to https://core.trac.wordpress.org/ticket/44979 which was fixed in WP 5.4, so it should be removed in the plugin as well.
@ocean90 ocean90 added the Gutenberg Plugin Issues or PRs related to Gutenberg Plugin management related efforts label Apr 30, 2020
@gziolo gziolo merged commit 52794cf into WordPress:master May 1, 2020
@github-actions github-actions bot added the First-time Contributor Pull request opened by a first-time contributor to Gutenberg repository label May 1, 2020
@github-actions github-actions bot added this to the Gutenberg 8.1 milestone May 1, 2020
@ellatrix ellatrix mentioned this pull request Jun 16, 2020
12 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
First-time Contributor Pull request opened by a first-time contributor to Gutenberg repository Gutenberg Plugin Issues or PRs related to Gutenberg Plugin management related efforts
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants