Problem/Motivation

The basic theme throws warnings until at least empty IE stylesheets setting is saved on the basic or a subtheme.

warning

Note, the Referrer is a subtheme but the warning says that issue is on the base basic theme.

Proposed resolution

Looks like a bit weird to save IE settings without any of IE versions is checked but that's working and warning is gone. Still, the warning issue need to be resolved, as I think.

save empty IE

Comments

drugan created an issue. See original summary.

drugan’s picture

StatusFileSize
new890 bytes

Possible solution is to add a ternary conditional and return an empty array if ie_enabled_versions setting does not exist yet.

drugan’s picture

Status: Active » Needs review
drugan’s picture

Title: Warning in a child theme if IE stylesheets is not set » Warning in a subtheme if IE stylesheets is not set
Issue summary: View changes
joelpittet’s picture

Yeah this sounds like it needs two things. A bit of a UI clean up to help it make sense and a default empty array value.

Thanks for the report @drugan

BenVercammen’s picture

What's the status of this issue? I'm asking because for the moment I get a fatal error (in stead of just a warning) when I go to the settings of my sub theme.

The line that raises the error (line 81 in theme-settings.php):
'#default_value' => array_keys(array_filter(theme_get_setting('ie_enabled_versions'))) ?: [],

A quick fix (when using PHP 7+, I think) would be:
'#default_value' => array_keys(array_filter(theme_get_setting('ie_enabled_versions') ?? [])) ?: [],

awasson’s picture

Status: Needs review » Closed (outdated)

IE is no longer supported and this is the 8.x version which is also no longer supported so I'm going to close this issue.

Thanks for the interest and activity.

Cheers,
Andrew