fix: robustly handle string NULL in avatar accessor

This commit is contained in:
antv
2026-07-09 09:09:05 +07:00
parent 25bb3d961e
commit 48bdf21de2
+1 -1
View File
@@ -77,7 +77,7 @@ class User extends Authenticatable
*/ */
public function getAvatarAttribute($value) public function getAvatarAttribute($value)
{ {
if (!$value) { if (!$value || strtolower($value) === 'null') {
return asset('images/avatar.png'); return asset('images/avatar.png');
} }