[wp-trac] [WordPress Trac] #54905: PHP notice while accessing Customizer
WordPress Trac
noreply at wordpress.org
Fri Feb 25 18:13:13 UTC 2022
#54905: PHP notice while accessing Customizer
-------------------------------------------------+-------------------------
Reporter: Boniu91 | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone: 5.9.2
Component: Customize | Version:
Severity: normal | Resolution:
Keywords: has-patch needs-testing has- | Focuses:
testing-info |
-------------------------------------------------+-------------------------
Comment (by ironprogrammer):
I was able to reproduce the issue. **tl;dr**, the patch fixes the original
notices, but there is a strikingly similar notice now caused by `class-wp-
customize-widgets.php`. @costdev, would you be able to address the same
issue there in your PR?
== Test Report
[https://github.com/WordPress/wordpress-develop/pull/2227 PR 2227]
=== Env
* WordPress 6.0-alpha-52448-src
* Safari 15.3
* macOS 12.2.1 (Monterey)
* Theme: Twenty Twenty-Two
* Gutenberg DISABLED 🔴
* Plugin: WooCommerce (activated, but not configured)
* wp-config: `define( 'WP_DEBUG_LOG', true );`
=== Steps to Test (BEFORE PATCH)
1. Navigate to ''Appearance > Customize'' (menu enabled by WooCommerce).
1. Observe that `/wp-content/debug.log` contains the following PHP notices
(paths modified for privacy):
{{{
[25-Feb-2022 17:53:11 UTC] PHP Notice: Trying to get property 'title' of
non-object in [...]/wp-includes/class-wp-customize-nav-menus.php on line
523
[25-Feb-2022 17:53:12 UTC] PHP Notice: Trying to get property 'title' of
non-object in [...]/wp-includes/class-wp-customize-widgets.php on line 895
[25-Feb-2022 17:53:12 UTC] PHP Notice: Trying to get property 'title' of
non-object in [...]/wp-includes/class-wp-customize-nav-menus.php on line
1152
}}}
=== Steps to Test (AFTER PATCH )
1. Navigate to ''Appearance > Customize'' (menu enabled by WooCommerce).
1. Observe that `/wp-content/debug.log` contains the following PHP notices
(paths modified for privacy):
{{{
[25-Feb-2022 18:06:08 UTC] PHP Notice: Trying to get property 'title' of
non-object in [...]/wp-includes/class-wp-customize-widgets.php on line 895
}}}
=== Expected Results (✅/❌)
- Patch addresses originally reported PHP notices. ✅
- Same notice appears in `class-wp-customize-widgets.php` in `wordpress-
develop:trunk`. ❌
--
Ticket URL: <https://core.trac.wordpress.org/ticket/54905#comment:15>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list