Skip to content

Commit 7a9913d

Browse files
committed
ACPT-1052: Some Luma Storefront Scenarios Are Broken
1 parent 31364ca commit 7a9913d

File tree

1 file changed

+8
-19
lines changed

1 file changed

+8
-19
lines changed

app/code/Magento/Eav/Model/Entity/Attribute/AbstractAttribute.php

Lines changed: 8 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -216,16 +216,6 @@ public function __construct(
216216
?: \Magento\Framework\App\ObjectManager::getInstance()->get(FrontendLabelFactory::class);
217217
}
218218

219-
/**
220-
* @inheritdoc
221-
*/
222-
public function _resetState() : void
223-
{
224-
if ($this->_backend instanceof ResetAfterRequestInterface) {
225-
$this->_backend->_resetState();
226-
}
227-
}
228-
229219
/**
230220
* Get Serializer instance.
231221
*
@@ -1458,17 +1448,16 @@ public function __wakeup()
14581448
*/
14591449
public function _resetState(): void
14601450
{
1461-
$this->unsetData('store_label');
1462-
$this->unsetData(self::OPTIONS);
1463-
if ($this->usesSource() && $this->getSource() instanceof ResetAfterRequestInterface) {
1464-
$this->getSource()->_resetState();
1451+
$this->unsetData('store_label'); // store specific
1452+
$this->unsetData(self::OPTIONS); // store specific
1453+
if ($this->_source instanceof ResetAfterRequestInterface) {
1454+
$this->_source->_resetState();
14651455
}
1466-
if ($this->getBackend() instanceof ResetAfterRequestInterface) {
1467-
$this->getBackend() ->_resetState();
1456+
if ($this->_backend instanceof ResetAfterRequestInterface) {
1457+
$this->_backend->_resetState();
14681458
}
1469-
if ($this->getFrontend()instanceof ResetAfterRequestInterface) {
1470-
$this->getFrontend() ->_resetState();
1459+
if ($this->_frontend instanceof ResetAfterRequestInterface) {
1460+
$this->_frontend->_resetState();
14711461
}
1472-
14731462
}
14741463
}

0 commit comments

Comments
 (0)