[wp-trac] [WordPress Trac] #63122: Site Editor: Browser reload causes PHP warning error on the Pages screen
WordPress Trac
noreply at wordpress.org
Wed Mar 19 03:42:36 UTC 2025
#63122: Site Editor: Browser reload causes PHP warning error on the Pages screen
----------------------------------------+---------------------
Reporter: wildworks | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone: 6.8
Component: Editor | Version: trunk
Severity: normal | Resolution:
Keywords: has-patch has-testing-info | Focuses:
----------------------------------------+---------------------
Comment (by wildworks):
@abcd95 Thanks for submitting the patch.
> The code correctly uses `$block_editor_context->post` in the first part,
but then incorrectly uses `$post` in the second part. Since `$post` is
undefined at this point, it triggers PHP warnings when the browser is
reloaded.
>
> The fix is to use the same variable throughout:
This approach looks correct to me.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/63122#comment:12>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list