PHP notice in global-styles.php #23085
Labels
Global Styles
Anything related to the broader Global Styles efforts, including Styles Engine and theme.json
[Status] In Progress
Tracking issues with work in progress
[Type] Bug
An existing feature does not function as intended
Using Gutenberg 8.3.0 I get this PHP warning on every front-end page access, as well as the editor:
The code carries on working regardless.
The line is:
$theme_gradients = get_theme_support( 'editor-gradient-presets' )[0];
Looking at the code for
get_theme_support
, it can return afalse
. It's probably worth adding a check for this before accessing it as an array.It currently happens in master too.
This is for the theme Twenty Twenty. I note there is an update pending for this on my test site, so it's possible theme support was added. However, the notice should be fixed for themes that don't have support.
To reproduce
Steps to reproduce the behavior:
The text was updated successfully, but these errors were encountered: