Catch empty preference, just in case.

This commit is contained in:
James Cole 2024-04-02 12:38:31 +02:00
parent 746f1fd300
commit 87911c2438
No known key found for this signature in database
GPG Key ID: B49A324B7EAD6D80

View File

@ -232,7 +232,7 @@ class Preferences
private function getUserGroupId(User $user, string $preferenceName): ?int
{
$groupId = null;
$items = config('firefly.admin_specific_prefs');
$items = config('firefly.admin_specific_prefs') ?? [];
if (in_array($preferenceName, $items, true)) {
$groupId = (int)$user->user_group_id;
}