File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed
app/code/Magento/Catalog/Model/ResourceModel/Product Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change 55 */
66namespace Magento \Catalog \Model \ResourceModel \Product ;
77
8+ use Magento \Framework \App \ObjectManager ;
89use Magento \Framework \Model \ResourceModel \Db \AbstractDb ;
910use Magento \Framework \Model \ResourceModel \Db \Context ;
1011use 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 /**
You can’t perform that action at this time.
0 commit comments