Skip to content

Commit 77ad90d

Browse files
remove exception
1 parent 8ca6c5a commit 77ad90d

File tree

1 file changed

+1
-8
lines changed

1 file changed

+1
-8
lines changed

app/code/Magento/Cms/Model/Page/DataProvider.php

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -159,14 +159,7 @@ public function getData()
159159
*/
160160
private function getCurrentPage(): Page
161161
{
162-
if (!$this->getRequestFieldName()) {
163-
throw new LocalizedException(__('RequestFieldName is not specified'));
164-
}
165-
166-
$pageId = (int)$this->request->getParam($this->getRequestFieldName());
167-
if ($pageId === 0) {
168-
throw new LocalizedException(__('Page ID must be given'));
169-
}
162+
$pageId = $this->request->getParam($this->getRequestFieldName(), 0);
170163

171164
return $this->pageRepository->getById($pageId);
172165
}

0 commit comments

Comments
 (0)