diff --git a/database/migrations/2022_02_03_214958_blank_out_ldap_active_flag.php b/database/migrations/2022_02_03_214958_blank_out_ldap_active_flag.php index db0f5bf803..e183788f05 100644 --- a/database/migrations/2022_02_03_214958_blank_out_ldap_active_flag.php +++ b/database/migrations/2022_02_03_214958_blank_out_ldap_active_flag.php @@ -14,11 +14,12 @@ class BlankOutLdapActiveFlag extends Migration */ public function up() { - $s = Setting::getSettings(); - $s->ldap_active_flag = ''; - $s->save(); + if ($s = Setting::getSettings()) { + $s->ldap_active_flag = ''; + $s->save(); + } } - + /** * Reverse the migrations. *