From 141baeb03500edc72e22bf3e4313f754dcde9b93 Mon Sep 17 00:00:00 2001 From: MartinOscar <40749467+RMartinOscar@users.noreply.github.com> Date: Tue, 3 Dec 2024 08:48:47 +0100 Subject: [PATCH] Empty array if user->oauth is null (#754) --- app/Filament/Resources/UserResource/Pages/EditProfile.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/Filament/Resources/UserResource/Pages/EditProfile.php b/app/Filament/Resources/UserResource/Pages/EditProfile.php index 2752d97af..12cb6b448 100644 --- a/app/Filament/Resources/UserResource/Pages/EditProfile.php +++ b/app/Filament/Resources/UserResource/Pages/EditProfile.php @@ -141,7 +141,7 @@ class EditProfile extends \Filament\Pages\Auth\EditProfile continue; } - $unlink = array_key_exists($name, $this->getUser()->oauth); + $unlink = array_key_exists($name, $this->getUser()->oauth ?? []); $providers[] = Action::make("oauth_$name") ->label(($unlink ? 'Unlink ' : 'Link ') . Str::title($name))