Skip to content

Commit

Permalink
Magento widgets source models forced to use deprecated interface #20064
Browse files Browse the repository at this point in the history
  • Loading branch information
milindsingh committed Jan 12, 2019
1 parent d1f9c6b commit a958f5b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/internal/Magento/Framework/Option/ArrayPool.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,13 @@ public function __construct(\Magento\Framework\ObjectManagerInterface $objectMan
*
* @param string $model
* @throws \InvalidArgumentException
* @return \Magento\Framework\Option\ArrayInterface
* @return \Magento\Framework\Data\OptionSourceInterface
*/
public function get($model)
{
$modelInstance = $this->_objectManager->get($model);
if (false == $modelInstance instanceof \Magento\Framework\Option\ArrayInterface) {
throw new \InvalidArgumentException($model . 'doesn\'t implement \Magento\Framework\Option\ArrayInterface');
if (false == $modelInstance instanceof \Magento\Framework\Data\OptionSourceInterface) {
throw new \InvalidArgumentException($model . 'doesn\'t implement \Magento\Framework\Data\OptionSourceInterface');
}
return $modelInstance;
}
Expand Down

0 comments on commit a958f5b

Please sign in to comment.