Skip to content

Commit

Permalink
remove exception
Browse files Browse the repository at this point in the history
  • Loading branch information
engcom-Charlie committed Dec 18, 2020
1 parent 8ca6c5a commit 77ad90d
Showing 1 changed file with 1 addition and 8 deletions.
9 changes: 1 addition & 8 deletions app/code/Magento/Cms/Model/Page/DataProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -159,14 +159,7 @@ public function getData()
*/
private function getCurrentPage(): Page
{
if (!$this->getRequestFieldName()) {
throw new LocalizedException(__('RequestFieldName is not specified'));
}

$pageId = (int)$this->request->getParam($this->getRequestFieldName());
if ($pageId === 0) {
throw new LocalizedException(__('Page ID must be given'));
}
$pageId = $this->request->getParam($this->getRequestFieldName(), 0);

return $this->pageRepository->getById($pageId);
}
Expand Down

0 comments on commit 77ad90d

Please sign in to comment.