-
Notifications
You must be signed in to change notification settings - Fork 835
My Jetpack: Prevent red bubble fatals when notification data is malformed #45385
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
base: trunk
Are you sure you want to change the base?
Conversation
Are you an Automattician? Please test your changes on all WordPress.com environments to help mitigate accidental explosions.
Interested in more tips and information?
|
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 🤖 Follow this PR Review Process:
If you have questions about anything, reach out in #jetpack-developers for guidance! |
Code Coverage SummaryCoverage changed in 1 file.
|
We recently touched unread counts at #45350 so I hope that didn't cause anything. |
Thanks! I've checked and the error existed prior to that PR being merged. I suspect it's more likely some third-party code or strange config. Almost every instance of the error is on a single site. |
Closes MONOREP-131
There was a burst of these recently:
This PR ensures the data is an array before trying to run
array_map()
on it.Proposed changes:
Other information:
Jetpack product discussion
Does this pull request change what data or activity we track or use?
Testing instructions:
I suspect posting a string to
/wp-json/my-jetpack/v1/red-bubble-notifications
should trigger it, but I'm not familiar with the proper auth required to do a POST. As an aside, I'm not sure why this is usingWP_REST_Server::CREATABLE
instead ofWP_REST_Server::READABLE
...