Commit 224eccbf authored by moodler's avatar moodler
Browse files

filter/mediaplugin MDL-19006 Better variable check to avoid notices

parent 2a88f626
......@@ -92,7 +92,7 @@ class mediaplugin_filter extends moodle_text_filter {
$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';
Supports Markdown
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