Skip to content

Commit 5ef851a

Browse files
committed
ENGCOM-3435: 19082-Fatal-error-Uncaught-Error-Cannot-call-abstract-method-Magento-… #19155 Fix static tests.
1 parent d22a4b5 commit 5ef851a

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

app/code/Magento/Catalog/Controller/Product/Compare.php

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
namespace Magento\Catalog\Controller\Product;
77

88
use Magento\Catalog\Api\ProductRepositoryInterface;
9+
use Magento\Framework\App\Action\HttpGetActionInterface;
910
use Magento\Framework\Data\Form\FormKey\Validator;
1011
use Magento\Framework\View\Result\PageFactory;
1112

@@ -15,7 +16,7 @@
1516
* @SuppressWarnings(PHPMD.LongVariable)
1617
* @SuppressWarnings(PHPMD.CouplingBetweenObjects)
1718
*/
18-
abstract class Compare extends \Magento\Framework\App\Action\Action
19+
abstract class Compare extends \Magento\Framework\App\Action\Action implements HttpGetActionInterface
1920
{
2021
/**
2122
* Customer id
@@ -141,11 +142,13 @@ public function setCustomerId($customerId)
141142
}
142143

143144
/**
144-
* {@inheritdoc}
145+
* @inheritdoc
145146
*/
146147
public function execute()
147148
{
148-
return $this->_redirect('catalog/product_compare');
149-
}
149+
$resultRedirect = $this->resultRedirectFactory->create();
150+
$resultRedirect->setPath('catalog/product_compare');
150151

152+
return $resultRedirect;
153+
}
151154
}

0 commit comments

Comments
 (0)