Skip to content

Commit d0f2201

Browse files
authored
Fix "area code is not set" in all commands that depend on Payment/Helper/Data
1 parent 055e4ed commit d0f2201

File tree

1 file changed

+1
-8
lines changed

1 file changed

+1
-8
lines changed

app/code/Magento/Payment/Helper/Data.php

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -31,12 +31,6 @@ class Data extends \Magento\Framework\App\Helper\AbstractHelper
3131
*/
3232
protected $_paymentConfig;
3333

34-
/**
35-
* Layout
36-
*
37-
* @var \Magento\Framework\View\LayoutInterface
38-
*/
39-
protected $_layout;
4034

4135
/**
4236
* Factory for payment method models
@@ -76,7 +70,6 @@ public function __construct(
7670
\Magento\Framework\App\Config\Initial $initialConfig
7771
) {
7872
parent::__construct($context);
79-
$this->_layout = $layoutFactory->create();
8073
$this->_methodFactory = $paymentMethodFactory;
8174
$this->_appEmulation = $appEmulation;
8275
$this->_paymentConfig = $paymentConfig;
@@ -183,7 +176,7 @@ public function getMethodFormBlock(MethodInterface $method, LayoutInterface $lay
183176
*/
184177
public function getInfoBlock(InfoInterface $info, LayoutInterface $layout = null)
185178
{
186-
$layout = $layout ?: $this->_layout;
179+
$layout = $layout ?: $layoutFactory->create();
187180
$blockType = $info->getMethodInstance()->getInfoBlockType();
188181
$block = $layout->createBlock($blockType);
189182
$block->setInfo($info);

0 commit comments

Comments
 (0)