Skip to content

Commit

Permalink
Check if media wysiwyg exists before trying to replace file IDs.
Browse files Browse the repository at this point in the history
  • Loading branch information
klaasvw committed May 6, 2014
1 parent 7953368 commit 79af18f
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion baseline_content.module
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,9 @@ function baseline_content_rollback($migration) {
* $text with fid in each media token replaced by the local value.
*/
function baseline_content_media_replace_fids($text) {
$text = preg_replace_callback(MEDIA_WYSIWYG_TOKEN_REGEX, 'baseline_content_media_token_filter', $text);
if (module_exists('media_wysiwyg')) {
$text = preg_replace_callback(MEDIA_WYSIWYG_TOKEN_REGEX, 'baseline_content_media_token_filter', $text);
}
return $text;
}

Expand Down

0 comments on commit 79af18f

Please sign in to comment.