Merge pull request #10654 from inietov/fixes/trying_to_get_property_checkin_email_of_non-object
Fixes ErrorException: Trying to get property 'checkin_email' of non-object [sc-17568]
This commit is contained in:
@@ -816,7 +816,9 @@ class Asset extends Depreciable
|
||||
*/
|
||||
public function checkin_email()
|
||||
{
|
||||
return $this->model->category->checkin_email;
|
||||
if (($this->model) && ($this->model->category)) {
|
||||
return $this->model->category->checkin_email;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user