commit 065b17bedb44dd993534ee83253ac11589acaa94 Author: Joel Pittet Date: Fri Aug 29 14:03:48 2014 -0700 message diff --git a/core/includes/theme.inc b/core/includes/theme.inc index 2bdfff5..11a20b9 100644 --- a/core/includes/theme.inc +++ b/core/includes/theme.inc @@ -1124,11 +1124,12 @@ function template_preprocess_image(&$variables) { $variables['attributes']['src'] = file_create_url($variables['uri']); foreach (array('width', 'height', 'alt', 'title') as $key) { - // If the property has already been defined in the attributes, do not override. - if (array_key_exists($key, $variables['attributes'])) { - continue; - } if (isset($variables[$key])) { + // If the property has already been defined in the attributes, + // do not override, including NULL. + if (isset($variables['attributes'][$key]) || array_key_exists($key, $variables['attributes'])) { + continue; + } $variables['attributes'][$key] = $variables[$key]; } }