We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8ca6c5a commit 77ad90dCopy full SHA for 77ad90d
app/code/Magento/Cms/Model/Page/DataProvider.php
@@ -159,14 +159,7 @@ public function getData()
159
*/
160
private function getCurrentPage(): Page
161
{
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
+ $pageId = $this->request->getParam($this->getRequestFieldName(), 0);
170
171
return $this->pageRepository->getById($pageId);
172
}
0 commit comments