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

Commit

Permalink
Merge pull request #906 from shemgp/patch-1
Browse files Browse the repository at this point in the history
Make it work with PHP 8.0
  • Loading branch information
stevebauman authored Feb 12, 2021
2 parents 2930a1e + 1fdfe32 commit 082e863
Showing 1 changed file with 3 additions and 1 deletion.
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;
}
}

0 comments on commit 082e863

Please sign in to comment.