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

Fix pass by reference PHP warnings due to PHP 4 compatibility hacks inherited from Core #19404

Closed
wants to merge 2 commits into from

Conversation

tomjn
Copy link
Contributor

@tomjn tomjn commented Jan 4, 2020

This closes #19403 and eliminates a PHP 4.x compatibility fix that causes problems

This fixes a number of PHP warnings. The styles and scripts objects don't need to be passed by reference, that's the default behaviour of objects in PHP 5.0+, the references are only there to avoid object duplication in PHP 4.0 which used pass by value semantics for objects, unlike 5.0 which switched to pass by reference.

How has this been tested?

I made the adjustment locally and the problems went away, no issues were introduced

Types of changes

Bug fix (non-breaking change which fixes an issue)

Checklist:

  • My code is tested.
  • 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. .

…re to fix a PHP warning

This closes WordPress#19403 and eliminates a PHP 4.x compatibility fix that causes problems
@tomjn tomjn changed the title Remove the reference in the gutenberg_register_packages_style signature Fix pass by reference PHP warnings due to PHP 4 compatibility hacks inherited from Core Jan 4, 2020
@earnjam
Copy link
Contributor

earnjam commented May 13, 2020

Looks like a duplicate PR was merged two weeks ago with #21987, so I'm going to close this one out.

@earnjam earnjam closed this May 13, 2020
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.

Parameter 1 to gutenberg_register_packages_styles() expected to be a reference, value given
2 participants