This is happening because not every $head_element has a '#tag' index.

I import content from an outside source which includes something to go in the head which I add directly using drupal_add_html_head() with #type = 'markup'. That means it has no #tag.

I guess we need a isset($head_element['#tag']) in the if statement.

Comments

arpeggio’s picture

Status: Active » Fixed

Hi icosa, I have already added isset($head_element['#tag']) in the if statement and committed/pushed it. Please use the dev version. Thank you for reporting this issue.

Status: Fixed » Closed (fixed)

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