global $DB;
if (self::$registration === null) {
- self::$registration = $DB->get_record('registration_hubs', ['huburl' => HUB_MOODLEORGHUBURL]);
+ self::$registration = $DB->get_record('registration_hubs', ['huburl' => HUB_MOODLEORGHUBURL]) ?: null;
}
if (self::$registration && (bool)self::$registration->confirmed == (bool)$confirmed) {
redirect(new moodle_url('/admin/registration/index.php', ['returnurl' => $returnurl->out_as_local_url(false)]));
}
}
-}
\ No newline at end of file
+}