MDL-19555: add NULL string test to format_test(). Credit goes to Matej Vela. Thanks

This commit is contained in:
Rossiani Wijaya
2011-03-11 12:14:29 +08:00
parent 1c712d947a
commit 04b4210605
+1 -1
View File
@@ -1502,7 +1502,7 @@ function format_text($text, $format=FORMAT_MOODLE, $options=NULL, $courseid=NULL
static $croncache = array();
if ($text === '') {
if ($text === '' || is_null($text)) {
return ''; // no need to do any filters and cleaning
}