File tree Expand file tree Collapse file tree 1 file changed +6
-3
lines changed
app/code/Magento/Catalog/Controller/Category Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change 9
9
use Magento \Catalog \Api \CategoryRepositoryInterface ;
10
10
use Magento \Catalog \Helper \Category as CategoryHelper ;
11
11
use Magento \Catalog \Model \Category ;
12
+ use Magento \Catalog \Model \Category \Attribute \LayoutUpdateManager ;
12
13
use Magento \Catalog \Model \Design ;
13
14
use Magento \Catalog \Model \Layer \Resolver ;
14
15
use Magento \Catalog \Model \Product \ProductList \ToolbarMemorizer ;
30
31
use Magento \Framework \View \Result \PageFactory ;
31
32
use Magento \Store \Model \StoreManagerInterface ;
32
33
use Psr \Log \LoggerInterface ;
33
- use Magento \Catalog \Model \Category \Attribute \LayoutUpdateManager ;
34
34
35
35
/**
36
36
* View a category on storefront. Needs to be accessible by POST because of the store switching.
@@ -208,8 +208,10 @@ protected function _initCategory()
208
208
* @return ResultInterface
209
209
* @throws NoSuchEntityException
210
210
*/
211
- public function execute ()
211
+ public function execute (): ? ResultInterface
212
212
{
213
+ $ result = null ;
214
+
213
215
if ($ this ->_request ->getParam (ActionInterface::PARAM_NAME_URL_ENCODED )) {
214
216
return $ this ->resultRedirectFactory ->create ()->setUrl ($ this ->_redirect ->getRedirectUrl ());
215
217
}
@@ -251,8 +253,9 @@ public function execute()
251
253
252
254
return $ page ;
253
255
} elseif (!$ this ->getResponse ()->isRedirect ()) {
254
- return $ this ->resultForwardFactory ->create ()->forward ('noroute ' );
256
+ $ result = $ this ->resultForwardFactory ->create ()->forward ('noroute ' );
255
257
}
258
+ return $ result ;
256
259
}
257
260
258
261
/**
You can’t perform that action at this time.
0 commit comments