Skip to content

Commit

Permalink
Merge pull request #5704 from asundust/patch-1
Browse files Browse the repository at this point in the history
修正preg_match()函数第二个参数需要为字符串
  • Loading branch information
jxlwqq authored Feb 3, 2023
2 parents 3fb6c9e + c87428f commit abd2392
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 abd2392

Please sign in to comment.