MDL-33531 backup Avoiding possible Notice
authorDavid Monllao <davidm@moodle.com>
Fri, 6 Jul 2012 07:43:33 +0000 (15:43 +0800)
committerDavid Monllao <davidm@moodle.com>
Fri, 10 Aug 2012 00:45:26 +0000 (08:45 +0800)
backup/util/helper/backup_cron_helper.class.php

index 917101f..a584b44 100644 (file)
@@ -511,7 +511,7 @@ abstract class backup_cron_automated_helper {
 
 
             // MDL-33531: use different filenames depending on backup_shortname option
-            if ( $config->backup_shortname ) {
+            if ( !empty($config->backup_shortname) ) {
                 $courseref = $course->shortname;
                 $courseref = str_replace(' ', '_', $courseref);
                 $courseref = textlib::strtolower(trim(clean_filename($courseref), '_'));