Skip to content

Commit e575a1f

Browse files
ENGCOM-3435: 19082-Fatal-error-Uncaught-Error-Cannot-call-abstract-method-Magento-… #19155
2 parents b8d84d3 + 5ef851a commit e575a1f

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

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

Lines changed: 13 additions & 1 deletion
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
@@ -139,4 +140,15 @@ public function setCustomerId($customerId)
139140
$this->_customerId = $customerId;
140141
return $this;
141142
}
143+
144+
/**
145+
* @inheritdoc
146+
*/
147+
public function execute()
148+
{
149+
$resultRedirect = $this->resultRedirectFactory->create();
150+
$resultRedirect->setPath('catalog/product_compare');
151+
152+
return $resultRedirect;
153+
}
142154
}

0 commit comments

Comments
 (0)