Check for a value for settings (this mostly matters in tests)

Signed-off-by: snipe <snipe@snipe.net>
This commit is contained in:
snipe 2023-12-19 19:00:11 +00:00
parent 98e6f7e14c
commit 70b8b7e4be

View file

@ -20,7 +20,7 @@ class FixLanguageDirs extends Migration
* Update the settings table
*/
$settings = Setting::getSettings();
if ($settings->locale != '') {
if (($settings) && ($settings->locale != '')) {
DB::table('settings')->update(['locale' => Helper::mapLegacyLocale($settings->locale)]);
}