-
Notifications
You must be signed in to change notification settings - Fork 798
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
(Jetpack)(PHP8)(GB 17.1.3) Make the check around $google_fonts_data
's array more resilient and return early if key or value is not of the right type
#34382
Conversation
Thank you for your PR! When contributing to Jetpack, we have a few suggestions that can help us test and review your patch:
This comment will be updated as you work on your PR and make changes. If you think that some of those checks are not needed for your PR, please explain why you think so. Thanks for cooperation 🤖 The e2e test report can be found here. Please note that it can take a few minutes after the e2e tests checks are complete for the report to be available. Once your PR is ready for review, check one last time that all required checks appearing at the bottom of this PR are passing or skipped. Jetpack plugin: The Jetpack plugin has different release cadences depending on the platform:
If you have any questions about the release process, please ask in the #jetpack-releases channel on Slack. |
Are you an Automattician? Please test your changes on all WordPress.com environments to help mitigate accidental explosions.
Interested in more tips and information?
|
Marking as a blocker since the fix has been deployed on WP.com Simple, so need to land this before next daily to ensure we don't regress. |
Corresponding diff: D129881-code |
@kraftbj Thanks for adding the changelog! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks 👍
projects/plugins/jetpack/modules/google-fonts/current/load-google-fonts.php
Outdated
Show resolved
Hide resolved
…ecated_font_data`, make it a bit more DRY
053c879
to
672410c
Compare
Proposed changes:
We've found that in some circumstances (which I couldn't pinpoint yet, exactly) when using PHP8 and Gutenberg 17.1.3+, the
$google_fonts_data['fontFamilies']
would benull
and cause a fatal. The actual changeset in GB that triggers it (when PHP8 is being used) is this WordPress/gutenberg#55240 adds a more resilient guard around it, extending the current one, and return early if the shape is not correct.See p1701220768492429-slack-CDLH4C1UZ and p1701369236916389-slack-C05Q5HSS013 for more context and info.
Other information:
Jetpack product discussion
Does this pull request change what data or activity we track or use?
Testing instructions:
Steps to reproduce are tricky, see p1701220768492429-slack-CDLH4C1UZ for more info. It needs some WPCOM-specific builds that might not be available in this repo.