Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
asbiin committed Oct 26, 2023
1 parent 9a7ec1f commit 726747b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/Models/User.php
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,7 @@ protected function localeIetf(): Attribute
{
return Attribute::make(
get: function ($value, $attributes) {
return Str::replace('_', '-', $attributes['locale']);
return isset($attributes['locale']) ? Str::replace('_', '-', $attributes['locale']) : null;
}
);
}
Expand Down

0 comments on commit 726747b

Please sign in to comment.