When using bootstrap theme PHP is giving next warning
Warning: Invalid argument supplied for foreach() in twig_drupal_join_filter() (line 293 of .../core/themes/engines/twig/twig.engine).
The problem is in html.html.twig:
<title>{{ head_title|safe_join(' | ') }}</title>
head_title is a string and not an array any more because of a next code in core template_preprocess_html():
$variables['head_title_array'] = $head_title;
$output = '';
$separator = '';
foreach ($head_title as $item) {
$output .= $separator . SafeMarkup::escape($item);
$separator = ' | ';
}
$variables['head_title'] = SafeMarkup::set($output);
So now bootstrap html.html.twig should either use
<title>{{ head_title_array|safe_join(' | ') }}</title>
or
<title>{{ head_title }}</title>
Comments
Comment #1
pivica commentedHere is a simple patch that just display head_title in the same way as other themes are doing it.
Comment #2
berdirComment #3
berdirWas fixed elsewhere.