Skip to content

Commit cc12a55

Browse files
authored
Regression fix from unit tests for __call method
1 parent 78fe7e7 commit cc12a55

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

lib/internal/Magento/Framework/DataObject.php

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -389,6 +389,13 @@ public function __call($method, $args)
389389
{
390390
switch ($method[0].($method[1] ?? '').($method[2] ?? '')) {
391391
case 'get':
392+
if (isset($args[0]) && $args[0] !== null) {
393+
return $this->getData(
394+
self::$_underscoreCache[$method] ?? $this->_underscore($method),
395+
$args[0]
396+
);
397+
}
398+
392399
return $this->_data[
393400
self::$_underscoreCache[$method] ?? $this->_underscore($method)
394401
] ?? $this->getData(

0 commit comments

Comments
 (0)