Skip to content

Commit

Permalink
fix preg_match() parameter #2 must be string
Browse files Browse the repository at this point in the history
preg_match(): Passing null to parameter #2 ($subject) of type string is deprecated in /vendor/laravel/framework/src/Illuminate/Routing/UrlGenerator.php on line 625
  • Loading branch information
asundust authored Dec 28, 2022
1 parent 3fb6c9e commit c87428f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Auth/Database/Administrator.php
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ public function __construct(array $attributes = [])
*/
public function getAvatarAttribute($avatar)
{
if (url()->isValidUrl($avatar)) {
if ($avatar && url()->isValidUrl($avatar)) {
return $avatar;
}

Expand Down

0 comments on commit c87428f

Please sign in to comment.