File tree Expand file tree Collapse file tree 1 file changed +5
-6
lines changed
app/code/Magento/Review/Controller/Product Expand file tree Collapse file tree 1 file changed +5
-6
lines changed Original file line number Diff line number Diff line change @@ -14,17 +14,16 @@ class ListAjax extends ProductController
14
14
/**
15
15
* Show list of product's reviews
16
16
*
17
- * @return \Magento\Framework\View\Result\Layout
17
+ * @return \Magento\Framework\App\ResponseInterface|\Magento\Framework\Controller\ResultInterface|\Magento\Framework\ View\Result\Layout
18
18
*/
19
19
public function execute ()
20
20
{
21
21
if (!$ this ->initProduct ()) {
22
- throw new LocalizedException (__ ('Cannot initialize product ' ));
23
- } else {
24
- /** @var \Magento\Framework\View\Result\Layout $resultLayout */
25
- $ resultLayout = $ this ->resultFactory ->create (ResultFactory::TYPE_LAYOUT );
22
+ /** @var \Magento\Framework\Controller\Result\Forward $resultForward */
23
+ $ resultForward = $ this ->resultFactory ->create (ResultFactory::TYPE_FORWARD );
24
+ return $ resultForward ->forward ('noroute ' );
26
25
}
27
26
28
- return $ resultLayout ;
27
+ return $ this -> resultFactory -> create (ResultFactory:: TYPE_LAYOUT ) ;
29
28
}
30
29
}
You can’t perform that action at this time.
0 commit comments