修改图片字段的错误
This commit is contained in:
parent
a9ae0ede08
commit
6475df1d71
@ -18,7 +18,7 @@ class BaseModel extends Model
|
||||
*/
|
||||
public function getImageAttr($value)
|
||||
{
|
||||
return trim($value) ? FileService::getFileUrl($value) : '';
|
||||
return empty($value) ? '' : (trim($value) ? FileService::getFileUrl($value) : '');
|
||||
}
|
||||
|
||||
/**
|
||||
@ -30,7 +30,7 @@ class BaseModel extends Model
|
||||
*/
|
||||
public function setImageAttr($value)
|
||||
{
|
||||
return trim($value) ? FileService::setFileUrl($value) : '';
|
||||
return empty($value) ? '' : (trim($value) ? FileService::setFileUrl($value) : '');
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
x
Reference in New Issue
Block a user