File tree Expand file tree Collapse file tree 1 file changed +4
-8
lines changed
app/code/Magento/Cms/Model/Page Expand file tree Collapse file tree 1 file changed +4
-8
lines changed Original file line number Diff line number Diff 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 = [
You can’t perform that action at this time.
0 commit comments