mirror of
https://github.com/snipe/snipe-it.git
synced 2026-02-04 23:05:41 +00:00
Validates if model and model->category exist before return the checkin_email property
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