Skip to content
Snippets Groups Projects
Commit 346f33e6 authored by Christophe Klein's avatar Christophe Klein Committed by Alberto Siles
Browse files

Issue #3204267 by christophe.klein: Warning: Invalid argument supplied for...

Issue #3204267 by christophe.klein: Warning: Invalid argument supplied for foreach() in bootstrap_barrio_preprocess_status_messages() (line 633 of bootstrap_barrio.theme)
parent 16079a2f
No related branches found
No related tags found
No related merge requests found
......@@ -602,8 +602,10 @@ function bootstrap_barrio_theme_suggestions_status_messages_alter(array &$sugges
*/
function bootstrap_barrio_preprocess_status_messages(&$variables) {
$variables['title_ids'] = [];
foreach ($variables['message_list'] as $message_type => $messages) {
$variables['title_ids'][$message_type] = Html::getUniqueId("message-$message_type-title");
if (is_countable($variables['message_list']) && count($variables['message_list'])) {
foreach ($variables['message_list'] as $message_type => $messages) {
$variables['title_ids'][$message_type] = Html::getUniqueId("message-$message_type-title");
}
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment