MDL-33531 backup Avoiding possible Notice

This commit is contained in:
David Monllao
2012-08-10 08:43:24 +08:00
parent dcc36c3aa2
commit b5ce7c4afc
@@ -510,7 +510,7 @@ abstract class backup_cron_automated_helper {
// variable, depending of languages, formats and automated backup settings
// 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 = moodle_strtolower(trim(clean_filename($courseref), '_'));