diff --git a/filter.php b/filter.php index 82f5cc9..067a560 100644 --- a/filter.php +++ b/filter.php @@ -48,11 +48,11 @@ $CFG->geshifilter_indentsize = 4; // urls="yes": Enable keyword-to-URL conversion // indentsize="num": Switch tabs for this many spaces. Be warned! Only TABS are replaced. function geshi_filter($courseid, $text) { - if (stripos($text, '')) { + if (stripos($text, '') !== false) { $search = '/(.*?)<\/code>\s*/is'; - } else if (stripos($text, '')) { + } else if (stripos($text, '') !== false) { $search = '/(.*?)<\/php>\s*/is'; - } else if (stripos($text, 'syntax=')) { + } else if (stripos($text, 'syntax=') !== false) { $search = '/(.*?)<\/span>\s*/is'; } else { return $text;