[wp-trac] [WordPress Trac] #54905: PHP notice while accessing Customizer
WordPress Trac
noreply at wordpress.org
Wed May 11 16:54:31 UTC 2022
#54905: PHP notice while accessing Customizer
-------------------------------------------------+-------------------------
Reporter: Boniu91 | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone: 6.1
Component: Customize | Version:
Severity: normal | Resolution:
Keywords: has-testing-info has-screenshots | Focuses:
has-patch dev-feedback |
-------------------------------------------------+-------------------------
Comment (by hellofromTonya):
I'm wondering why this happens. Yes, I see the effect where the
notification itself is happening due to no object being returned and no
guard in place. However, going past this, how does the code even get to
this point?
What do I mean?
With block themes, the intent is for the Menus and Widgets sections not be
displayed in Customizer. Okay, then thinking more broadly, when should
`WP_Customize_Widgets` and `WP_Customize_Nav_Menus` either bail out or not
be instantiated?
Is the "removal" logic too late in the execution stack?
Is there an earlier approach to prevent unneeded code from executing?
Resolving this fixes this ticket and enhances performance.
Off the top of my head, I'm not sure. Deeper dive is needed. Raising it
here though for broader thinking and discussion.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/54905#comment:32>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list