mirror of
https://github.com/silverstripe/silverstripe-reports
synced 2024-10-22 11:05:53 +02:00
MINOR FIX: prevents looping over an empty array
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/cms/trunk@86166 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
parent
966155a054
commit
85ee1007c4
@ -1102,6 +1102,7 @@ JS;
|
||||
$start = 0;
|
||||
$pages = DataObject::get("SiteTree", "", "", "", "$start,30");
|
||||
$count = 0;
|
||||
if($pages){
|
||||
while(true) {
|
||||
foreach($pages as $page) {
|
||||
if($page && !$page->canPublish()) return Security::permissionFailure($this);
|
||||
@ -1119,7 +1120,7 @@ JS;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
$response .= sprintf(_t('CMSMain.PUBPAGES',"Done: Published %d pages"), $count);
|
||||
|
||||
} else {
|
||||
|
Loading…
Reference in New Issue
Block a user