Skip to content

Commit 8b21b2f

Browse files
committed
Double check if session contains attributes
1 parent fc2b7b0 commit 8b21b2f

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

src/Auth/RegistersUsersWithIdentity.php

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -198,6 +198,12 @@ protected function pullAttributes($request)
198198
return [];
199199
}
200200

201-
return json_decode($request->session()->pull('_oot.identities.attributes'), true);
201+
$savedAttributes = $request->session()->pull('_oot.identities.attributes') ?? null;
202+
203+
if (! $savedAttributes) {
204+
return [];
205+
}
206+
207+
return json_decode($savedAttributes, true);
202208
}
203209
}

0 commit comments

Comments
 (0)