Skip to content
This repository was archived by the owner on Jul 24, 2023. It is now read-only.

Make it work with PHP 8.0 #906

Merged
merged 2 commits into from
Feb 12, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion src/Validation/Rules/DenyTrashed.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ public function isValid()
*/
protected function isTrashed()
{
return method_exists($this->model, 'trashed') && $this->model->trashed();
return $this->model
? method_exists($this->model, 'trashed') && $this->model->trashed()
: false;
}
}