From 8650faf0d8d8568c3e25207de079ad4f0d8d91b6 Mon Sep 17 00:00:00 2001 From: Brady Wetherington Date: Thu, 3 Feb 2022 20:04:33 -0800 Subject: [PATCH] D'oh! Migration fails on empty settings table :( --- .../2022_02_03_214958_blank_out_ldap_active_flag.php | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) 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. *