BUGFIX: Error trying to access OwnerGroups() method on boolean value

This commit is contained in:
pjayme 2018-08-22 08:20:36 +12:00
parent cc4b6960e6
commit 156a76a8e5
2 changed files with 12 additions and 8 deletions

View File

@ -217,11 +217,13 @@ class PagesDueForReviewReport extends Report
$records = $records->filterByCallback(function ($page) use ($currentUser) {
$options = $page->getOptions();
if ($options) {
foreach ($options->ContentReviewOwners() as $owner) {
if ($currentUser->ID == $owner->ID) {
return true;
}
}
}
return false;
});

View File

@ -70,6 +70,7 @@ class ContentReviewEmails extends BuildTask
$option = $page->getOptions();
if ($options) {
foreach ($option->ContentReviewOwners() as $owner) {
if (!isset($overduePages[$owner->ID])) {
$overduePages[$owner->ID] = ArrayList::create();
@ -78,6 +79,7 @@ class ContentReviewEmails extends BuildTask
$overduePages[$owner->ID]->push($page);
}
}
}
return $overduePages;
}