Skip to content

Commit 2be562a

Browse files
committed
MC-33288: [2.4][MSI][MFTF] StorefrontLoggedInCustomerCreateOrderAllOptionQuantityConfigurableProductCustomStockTest fails because of bad design
1 parent 7569b08 commit 2be562a

File tree

1 file changed

+4
-3
lines changed
  • app/code/Magento/Catalog/Model/ResourceModel/Product

1 file changed

+4
-3
lines changed

app/code/Magento/Catalog/Model/ResourceModel/Product/Relation.php

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
*/
66
namespace Magento\Catalog\Model\ResourceModel\Product;
77

8+
use Magento\Framework\App\ObjectManager;
89
use Magento\Framework\Model\ResourceModel\Db\AbstractDb;
910
use Magento\Framework\Model\ResourceModel\Db\Context;
1011
use Magento\Framework\EntityManager\MetadataPool;
@@ -24,16 +25,16 @@ class Relation extends AbstractDb
2425

2526
/**
2627
* @param Context $context
27-
* @param null $connectionName
28+
* @param string $connectionName
2829
* @param MetadataPool $metadataPool
2930
*/
3031
public function __construct(
3132
Context $context,
3233
$connectionName = null,
33-
MetadataPool $metadataPool
34+
MetadataPool $metadataPool = null
3435
) {
3536
parent::__construct($context, $connectionName);
36-
$this->metadataPool = $metadataPool;
37+
$this->metadataPool = $metadataPool ?: ObjectManager::getInstance()->get(MetadataPool::class);
3738
}
3839

3940
/**

0 commit comments

Comments
 (0)