File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed
app/code/Magento/CatalogInventory/Model/Source Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change 99use Magento \CatalogInventory \Model \Stock as StockModel ;
1010use Magento \Eav \Model \Entity \Attribute \Source \AbstractSource ;
1111use Magento \Eav \Model \Entity \Collection \AbstractCollection ;
12+ use Magento \Framework \App \ObjectManager ;
1213use Magento \Framework \Data \Collection ;
1314use Magento \Framework \EntityManager \MetadataPool ;
1415
@@ -29,12 +30,12 @@ class Stock extends AbstractSource
2930 private $ metadataPool ;
3031
3132 /**
32- * @param MetadataPool $metadataPool
33+ * @param MetadataPool|null $metadataPool
3334 */
3435 public function __construct (
35- MetadataPool $ metadataPool
36+ MetadataPool $ metadataPool = null
3637 ) {
37- $ this ->metadataPool = $ metadataPool ;
38+ $ this ->metadataPool = $ metadataPool ?? ObjectManager:: getInstance ()-> get (MetadataPool::class) ;
3839 }
3940
4041 /**
You can’t perform that action at this time.
0 commit comments