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

Commit

Permalink
[TASK] Use foreach loop when detecting page UID
Browse files Browse the repository at this point in the history
  • Loading branch information
NamelessCoder committed Aug 13, 2017
1 parent 00100ee commit 0eb29db
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions Classes/Configuration/BackendConfigurationManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -57,11 +57,11 @@ public function getCurrentPageId()
return $this->currentPageId;
}
$pageUids = $this->getPrioritizedPageUids();
// parent::getCurrentPageId() in getPrioritizedPageUids() set possible wrong value
$this->currentPageId = 0;
while (true === empty($this->currentPageId) && true !== empty($pageUids)) {
$this->currentPageId = array_shift($pageUids);
};
foreach ($pageUids as $pageUid) {
if ($pageUid > 0) {
return $this->currentPageId = $pageUid;
}
}
return $this->currentPageId;
}

Expand Down

0 comments on commit 0eb29db

Please sign in to comment.