mirror of
https://github.com/silverstripe/silverstripe-contentreview
synced 2024-10-22 17:05:47 +02:00
Fixing method call bug in canBeReviewedBy() (#1)
If getOptions returns false, then canBeReviewedBy() throws "Call to a member function OwnerGroups() on boolean". This will return false, in the the case that options are false.
This commit is contained in:
parent
1711eb8aa6
commit
9378483378
@ -453,6 +453,10 @@ class SiteTreeContentReview extends DataExtension implements PermissionProvider
|
||||
}
|
||||
|
||||
$options = $this->getOptions();
|
||||
|
||||
if (!$options) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if ($options->OwnerGroups()->count() == 0 && $options->OwnerUsers()->count() == 0) {
|
||||
return false;
|
||||
|
Loading…
Reference in New Issue
Block a user