Problem/Motivation

When the Zen base theme is updated on a site, the following PHP warnings appear on each page:

Warning: in_array() [function.in-array]: Wrong datatype for second argument in zen_preprocess_html() (line 111 of sites/all/themes/zen/template.php).
Warning: in_array() [function.in-array]: Wrong datatype for second argument in zen_preprocess_html() (line 112 of sites/all/themes/zen/template.php).
Warning: in_array() [function.in-array]: Wrong datatype for second argument in zen_preprocess_html() (line 113 of sites/all/themes/zen/template.php).

This is due to a core bug preventing the default values of Zen's theme settings from being inherited by sub-themes. #761608: Missing theme settings values because list_themes() has inconsistent theme object data :-(

Proposed resolution

We need to get #761608: Missing theme settings values because list_themes() has inconsistent theme object data fixed.

But the workaround for this is to add these lines to your sub-theme's .info file:

settings[zen_html5_respond_meta][] = respond
settings[zen_html5_respond_meta][] = html5
settings[zen_html5_respond_meta][] = meta

Original report by Mon Reveur

When I updated Zen theme (7.x-5.x-dev) on 11/29/11, I ran a "CRON" and received the following:

Warning: in_array() [function.in-array]: Wrong datatype for second argument in zen_preprocess_html() (line 111 of /home/everyday/public_html/sites/all/themes/zen/template.php).
Warning: in_array() [function.in-array]: Wrong datatype for second argument in zen_preprocess_html() (line 112 of /home/everyday/public_html/sites/all/themes/zen/template.php).
Warning: in_array() [function.in-array]: Wrong datatype for second argument in zen_preprocess_html() (line 113 of /home/everyday/public_html/sites/all/themes/zen/template.php).

Comments

KrisBulman’s picture

I also got this today, it seems to be something with the html5 meta variables

Mon Reveur’s picture

hmmm... I wonder if the 11/30 version fixes the problem but it's not showing up on my website as being available.

Mon Reveur’s picture

Ok... Tried using the version listed here on the project page which is dated 11/30... Installed it... and it still says 11/29 on the "available updates" report. I was hoping whoever is working on this project would have fixed it without realizing.

JohnAlbin’s picture

Version: 7.x-5.x-dev » 7.x-3.x-dev
Category: support » bug
Priority: Normal » Critical

The problem is that we added a new theme setting to Zen over in #1154358: Add theme setting for skip link text It's a sweet feature that makes configuring the "skip link" a snap.

HOWEVER… there is a core bug preventing Zen's theme settings defaults from being inherited by sub-themes. #761608: Missing theme settings values because list_themes() has inconsistent theme object data :-(

The workaround for this is to add these lines to your sub-theme's .info file:

settings[zen_html5_respond_meta][] = respond
settings[zen_html5_respond_meta][] = html5
settings[zen_html5_respond_meta][] = meta

I was about to release Zen 7.x-3.2, but I realized that all the sub-theme's that don't override Zen's html.tpl.php will break. Since they won't inherit the new "skip link text" default value from Zen's .info file, their skip link will have NO TEXT AT ALL. Not exactly "accessible". :-(((

JohnAlbin’s picture

Component: PHP code » layout.css

This bug is fixed in Drupal 8 now. Waiting on it being committed to Drupal 7.

JohnAlbin’s picture

Component: layout.css » PHP/JS code
Liam Morland’s picture

Issue tags: +Accessibility

Correct tag

JohnAlbin’s picture

Issue tags: -Accessibility

Removing tag

JohnAlbin’s picture

Title: Warning message after updating Zen theme (11/29/11 release) and running cron..... » PHP warning message about in_array() after updating Zen theme
JohnAlbin’s picture

Status: Active » Fixed

This has been fixed in D7 core.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

Anonymous’s picture

Issue summary: View changes

Add issue summary