Skip to content

Commit

Permalink
filter/mediaplugin MDL-19006 Better variable check to avoid notices
Browse files Browse the repository at this point in the history
  • Loading branch information
moodler committed May 1, 2009
1 parent 2a88f62 commit 224eccb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion filter/mediaplugin/filter.php
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ function filter($text) {
$newtext = preg_replace_callback($search, 'mediaplugin_filter_youtube_callback', $newtext);
}

if ($CFG->filter_mediaplugin_enable_img) {
if (!empty($CFG->filter_mediaplugin_enable_img)) {
$search = '/<a.*?href="([^<]+\.jpg)"[^>]*>(.*?)<\/a>/is';
$newtext = preg_replace_callback($search, 'mediaplugin_filter_img_callback', $newtext);
$search = '/<a.*?href="([^<]+\.png)"[^>]*>(.*?)<\/a>/is';
Expand Down

0 comments on commit 224eccb

Please sign in to comment.