mirror of
https://github.com/silverstripe/silverstripe-contentreview
synced 2024-10-22 17:05:47 +02:00
BUGFIX: Error trying to access OwnerGroups() method on boolean value
This commit is contained in:
parent
cc4b6960e6
commit
156a76a8e5
@ -217,9 +217,11 @@ class PagesDueForReviewReport extends Report
|
||||
$records = $records->filterByCallback(function ($page) use ($currentUser) {
|
||||
$options = $page->getOptions();
|
||||
|
||||
foreach ($options->ContentReviewOwners() as $owner) {
|
||||
if ($currentUser->ID == $owner->ID) {
|
||||
return true;
|
||||
if ($options) {
|
||||
foreach ($options->ContentReviewOwners() as $owner) {
|
||||
if ($currentUser->ID == $owner->ID) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -70,12 +70,14 @@ class ContentReviewEmails extends BuildTask
|
||||
|
||||
$option = $page->getOptions();
|
||||
|
||||
foreach ($option->ContentReviewOwners() as $owner) {
|
||||
if (!isset($overduePages[$owner->ID])) {
|
||||
$overduePages[$owner->ID] = ArrayList::create();
|
||||
}
|
||||
if ($options) {
|
||||
foreach ($option->ContentReviewOwners() as $owner) {
|
||||
if (!isset($overduePages[$owner->ID])) {
|
||||
$overduePages[$owner->ID] = ArrayList::create();
|
||||
}
|
||||
|
||||
$overduePages[$owner->ID]->push($page);
|
||||
$overduePages[$owner->ID]->push($page);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user