From 083a4eca4a2ebc5276eed2f11fc4a595b07898ba Mon Sep 17 00:00:00 2001 From: Fabian Franz Date: Tue, 11 Sep 2018 22:57:18 +0200 Subject: [PATCH] Issue #2996519 by DamienMcKenna, joseph.olstad, Pol: PHP 7.2 compatibility - make sure some variables are arrays in theme_links() --- CHANGELOG.txt | 1 + includes/theme.inc | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.txt b/CHANGELOG.txt index 4563f666ea7..af39a97dd2d 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -12,6 +12,7 @@ Drupal 7.xx, xxxx-xx-xx (development version) - PHP 7.2: Removed deprecated function each(). - PHP 7.2: Avoid count() calls on uncountable variables. - PHP 7.2: Removed deprecated create_function() call. +- PHP 7.2: Make sure variables are arrays in theme_links(). - Fixed theme-settings.php not being loaded on cached forms Drupal 7.59, 2018-04-25 diff --git a/includes/theme.inc b/includes/theme.inc index 9bb31d9d75d..a1fd1af3045 100644 --- a/includes/theme.inc +++ b/includes/theme.inc @@ -1776,8 +1776,8 @@ function theme_link($variables) { * http://www.w3.org/TR/WCAG-TECHS/H42.html for more information. */ function theme_links($variables) { - $links = $variables['links']; - $attributes = $variables['attributes']; + $links = (array) $variables['links']; + $attributes = (array) $variables['attributes']; $heading = $variables['heading']; global $language_url; $output = '';