Commit 57e067f6 authored by circuscowboy's avatar circuscowboy Committed by joseph.olstad

Issue #2327329 by drnikki, recrit, circuscowboy: Undefined index in media_wysiwyg_token_to_markup()

parent 0e035bfd
......@@ -158,7 +158,12 @@ function media_wysiwyg_token_to_markup($match, $wysiwyg = FALSE, $langcode = NUL
$file->{$key} = $value;
}
$attributes = is_array($tag_info['attributes']) ? $tag_info['attributes'] : array();
if (array_key_exists('attributes', $tag_info) && is_array($tag_info['attributes'])) {
$attributes = $tag_info['attributes'];
}
else {
$attributes = array();
}
$attribute_whitelist = media_wysiwyg_allowed_attributes();
$settings['attributes'] = array_intersect_key($attributes, array_flip($attribute_whitelist));
$settings['fields'] = $fields;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment