IE7 specific code was added to wysiwyg-media.js in #860518: Media images cannot be resized in the WYSIWYG using Internet Explorer, but this now causes errors after using a Wysiwyg editor to place an inline image in a node body:
Warning: explode() expects parameter 2 to be string, array given in media_parse_css_declarations() (line 123 of /sites/all/modules/media/includes/media.filter.inc).
Warning: array_map(): Argument #2 should be an array in media_parse_css_declarations() (line 123 of /sites/all/modules/media/includes/media.filter.inc).
Warning: Invalid argument supplied for foreach() in media_parse_css_declarations() (line 123 of /sites/all/modules/media/includes/media.filter.inc).
This is due to the following JavaScript:
mediaAttributes.style = {
height: imgHeight,
width: imgWidth
}
This sets mediaAttributes['style'] to an array, but the PHP parser only expects members of this array to be strings.
Comments
Comment #1
longwaveAttached patch fixes this for me, as I don't think the "style" property is needed at all here.
Comment #3
longwaveFixing paths in the patch
Comment #4
steinmb commented