Skip to content

Commit c87fd59

Browse files
authored
ENGCOM-3846: Magento widgets source models forced to use deprecated interface #20064 #20248
2 parents df3ca68 + 682fe1f commit c87fd59

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

lib/internal/Magento/Framework/Option/ArrayPool.php

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,13 +28,14 @@ public function __construct(\Magento\Framework\ObjectManagerInterface $objectMan
2828
*
2929
* @param string $model
3030
* @throws \InvalidArgumentException
31-
* @return \Magento\Framework\Option\ArrayInterface
31+
* @return \Magento\Framework\Data\OptionSourceInterface
3232
*/
3333
public function get($model)
3434
{
3535
$modelInstance = $this->_objectManager->get($model);
36-
if (false == $modelInstance instanceof \Magento\Framework\Option\ArrayInterface) {
37-
throw new \InvalidArgumentException($model . 'doesn\'t implement \Magento\Framework\Option\ArrayInterface');
36+
if (false == $modelInstance instanceof \Magento\Framework\Data\OptionSourceInterface) {
37+
throw new \InvalidArgumentException($model
38+
. 'doesn\'t implement \Magento\Framework\Data\OptionSourceInterface');
3839
}
3940
return $modelInstance;
4041
}

0 commit comments

Comments
 (0)