diff --git a/admin/tool/recyclebin/classes/category_bin.php b/admin/tool/recyclebin/classes/category_bin.php index 3c18f62d5288b..18b4d8eb2c66a 100644 --- a/admin/tool/recyclebin/classes/category_bin.php +++ b/admin/tool/recyclebin/classes/category_bin.php @@ -117,7 +117,7 @@ public function store_item($course) { // This hack will be removed once recycle bin switches to use its own backup mode, with // own preferences and 100% separate from MOODLE_AUTOMATED. // TODO: Remove this as part of MDL-65228. - $forcedbackupsettings = $CFG->forced_plugin_settings['backup'] ?? null; + $forcedbackupsettings = $CFG->forced_plugin_settings['backup'] ?? []; $CFG->forced_plugin_settings['backup']['backup_auto_storage'] = 0; $CFG->forced_plugin_settings['backup']['backup_auto_files'] = 1; @@ -253,7 +253,7 @@ public function restore_item($item) { // This hack will be removed once recycle bin switches to use its own backup mode, with // own preferences and 100% separate from MOODLE_AUTOMATED. // TODO: Remove this as part of MDL-65228. - $forcedrestoresettings = $CFG->forced_plugin_settings['restore'] ?? null; + $forcedrestoresettings = $CFG->forced_plugin_settings['restore'] ?? []; $CFG->forced_plugin_settings['restore']['restore_general_users'] = 1; $CFG->forced_plugin_settings['restore']['restore_general_groups'] = 1; diff --git a/admin/tool/recyclebin/classes/course_bin.php b/admin/tool/recyclebin/classes/course_bin.php index bfb19b4790cc0..069fef2f396d4 100644 --- a/admin/tool/recyclebin/classes/course_bin.php +++ b/admin/tool/recyclebin/classes/course_bin.php @@ -121,7 +121,7 @@ public function store_item($cm) { // This hack will be removed once recycle bin switches to use its own backup mode, with // own preferences and 100% separate from MOODLE_AUTOMATED. // TODO: Remove this as part of MDL-65228. - $forcedbackupsettings = $CFG->forced_plugin_settings['backup'] ?? null; + $forcedbackupsettings = $CFG->forced_plugin_settings['backup'] ?? []; $CFG->forced_plugin_settings['backup']['backup_auto_storage'] = 0; $CFG->forced_plugin_settings['backup']['backup_auto_files'] = 1;