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: Fatal php error if a template was created by an author that was deleted. #56990

Conversation

jorgefilipecosta
Copy link
Member

@jorgefilipecosta jorgefilipecosta commented Dec 12, 2023

Fixes a fatal php error if a template was created by an author that was deleted.
cc: @fullofcaffeine

Testing

I'm not being able to test this scenario in the UI as when we delete a user the UI forces content deletion, or attribution to another author. But I guess it may happen and it is good to have this safe guard.

@jorgefilipecosta jorgefilipecosta added the [Type] Bug An existing feature does not function as intended label Dec 12, 2023
Copy link

This pull request has changed or added PHP files. Please confirm whether these changes need to be synced to WordPress Core, and therefore featured in the next release of WordPress.

If so, it is recommended to create a new Trac ticket and submit a pull request to the WordPress Core Github repository soon after this pull request is merged.

If you're unsure, you can always ask for help in the #core-editor channel in WordPress Slack.

Thank you! ❤️

View changed files
❔ lib/compat/wordpress-6.5/rest-api.php

Copy link

Flaky tests detected in 2df9ae4.
Some tests passed with failed attempts. The failures may not be related to this commit but are still reported for visibility. See the documentation for more information.

🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/7185824178
📝 Reported issues:

@jorgefilipecosta jorgefilipecosta merged commit 482ac0c into trunk Dec 12, 2023
53 of 54 checks passed
@jorgefilipecosta jorgefilipecosta deleted the fix/fatal-php-error-if-a-template-was-created-by-an-author-that-was-deleted branch December 12, 2023 19:13
@github-actions github-actions bot added this to the Gutenberg 17.3 milestone Dec 12, 2023
@fullofcaffeine
Copy link
Member

fullofcaffeine commented Dec 12, 2023

Thanks for the quick turnaround here! 🙇🏻

@getdave
Copy link
Contributor

getdave commented Jan 25, 2024

Being backported in WordPress/wordpress-develop#5940

@youknowriad youknowriad added the Backported to WP Core Pull request that has been successfully merged into WP Core label Jan 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Backported to WP Core Pull request that has been successfully merged into WP Core [Type] Bug An existing feature does not function as intended
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants