Skip to content

Commit f11d277

Browse files
introduced requested changes
1 parent 2900e74 commit f11d277

File tree

1 file changed

+4
-8
lines changed

1 file changed

+4
-8
lines changed

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

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -164,10 +164,9 @@ private function getCurrentPage(): PageInterface
164164
return $this->pageFactory->create();
165165
}
166166
$this->dataPersistor->clear('cms_page');
167-
$page = $this->pageFactory->create()
168-
->setData($data);
169167

170-
return $page;
168+
return $this->pageFactory->create()
169+
->setData($data);
171170
}
172171

173172
/**
@@ -217,17 +216,14 @@ public function getMeta()
217216
$page = null;
218217
try {
219218
$page = $this->pageRepository->getById($this->getPageId());
220-
} catch (LocalizedException $e) {
221-
$this->logger->error($e->getMessage());
222-
}
223-
224-
if ($page) {
225219
if ($page->getCustomLayoutUpdateXml() || $page->getLayoutUpdateXml()) {
226220
$options[] = ['label' => 'Use existing layout update XML', 'value' => '_existing_'];
227221
}
228222
foreach ($this->customLayoutManager->fetchAvailableFiles($page) as $layoutFile) {
229223
$options[] = ['label' => $layoutFile, 'value' => $layoutFile];
230224
}
225+
} catch (LocalizedException $e) {
226+
$this->logger->error($e->getMessage());
231227
}
232228

233229
$customLayoutMeta = [

0 commit comments

Comments
 (0)