Empty array if user->oauth is null (#754)

This commit is contained in:
MartinOscar 2024-12-03 08:48:47 +01:00 committed by GitHub
parent bd51191da6
commit 141baeb035
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -141,7 +141,7 @@ class EditProfile extends \Filament\Pages\Auth\EditProfile
continue; continue;
} }
$unlink = array_key_exists($name, $this->getUser()->oauth); $unlink = array_key_exists($name, $this->getUser()->oauth ?? []);
$providers[] = Action::make("oauth_$name") $providers[] = Action::make("oauth_$name")
->label(($unlink ? 'Unlink ' : 'Link ') . Str::title($name)) ->label(($unlink ? 'Unlink ' : 'Link ') . Str::title($name))