diff --git a/lib/classes/hub/registration.php b/lib/classes/hub/registration.php index d2a8672d909..98657820c59 100644 --- a/lib/classes/hub/registration.php +++ b/lib/classes/hub/registration.php @@ -82,7 +82,7 @@ class registration { 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) { @@ -578,4 +578,4 @@ class registration { redirect(new moodle_url('/admin/registration/index.php', ['returnurl' => $returnurl->out_as_local_url(false)])); } } -} \ No newline at end of file +}