MDL-32279 filter: fix undefined variable
authorDan Poltawski <dan@moodle.com>
Fri, 15 Jun 2012 03:57:22 +0000 (11:57 +0800)
committerDan Poltawski <dan@moodle.com>
Fri, 15 Jun 2012 03:58:03 +0000 (11:58 +0800)
lib/weblib.php

index d84d16d..644d48b 100644 (file)
@@ -1302,7 +1302,8 @@ function format_string($string, $striplinks = true, $options = NULL) {
     $string = replace_ampersands_not_followed_by_entity($string);
 
     if (!empty($CFG->filterall)) {
-        $string = filter_manager::instance()->filter_string($string, $options['context']);
+        $filtermanager = filter_manager::instance();
+        $string = $filtermanager->filter_string($string, $options['context']);
         $filtermanager->setup_page_for_filters($PAGE, $options['context']); // Setup global stuff filters may have.
     }