File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed
app/code/Magento/Review/Controller/Product Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -14,12 +14,15 @@ 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 ' ));
22
+ /** @var \Magento\Framework\Controller\Result\Forward $resultForward */
23
+ $ resultForward = $ this ->resultFactory ->create (ResultFactory::TYPE_FORWARD );
24
+ $ resultForward ->forward ('noroute ' );
25
+ return $ resultForward ;
23
26
} else {
24
27
/** @var \Magento\Framework\View\Result\Layout $resultLayout */
25
28
$ resultLayout = $ this ->resultFactory ->create (ResultFactory::TYPE_LAYOUT );
You can’t perform that action at this time.
0 commit comments