[wp-trac] [WordPress Trac] #63756: Undefined array key "slug" in /wp-includes/class-wp-theme-json.php on line 3264
WordPress Trac
noreply at wordpress.org
Sun Jul 27 13:00:27 UTC 2025
#63756: Undefined array key "slug" in /wp-includes/class-wp-theme-json.php on line
3264
-------------------------+-----------------------------
Reporter: MeraX | Owner: (none)
Type: enhancement | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Themes | Version: 6.8.2
Severity: normal | Keywords: has-patch
Focuses: template |
-------------------------+-----------------------------
Hi there, I'm running WordPress 6.8.2 with a child theme of Twenty Twenty-
Three. I've been tuning colors and other theme settings with the generic
WordPress site-editor (Gutenberg). I'm not sure when the following warning
started to appear in my longs, but now I'm having plenty of the following
warnings in my log:
{{{
PHP message: PHP Warning: Undefined array key "slug" in [...]/wp-includes
/class-wp-theme-json.php on line 3264;
}}}
It appears to me that there is a discrepancy between my `theme.json` and
that code. However, my `theme.json` was only changed through the official
editor. Unfortunately, I'm unable to recall all the steps I did.
Nonetheless, I would propose adding a `isset( $item['slug'] )` check
before accessing it in the code that is raising the above warning.
I've prepared a path on GitHub.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/63756>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list