Skip to content

Commit 738eeef

Browse files
committed
Merge remote-tracking branch '36321/patch-4' into comm_voted
2 parents 14165c1 + 0419441 commit 738eeef

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

lib/internal/Magento/Framework/DataObject.php

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -128,11 +128,10 @@ public function getData($key = '', $index = null)
128128
return $this->_data;
129129
}
130130

131-
/* process a/b/c key as ['a']['b']['c'] */
132-
if ($key !== null && strpos($key, '/') !== false) {
131+
$data = $this->_data[$key] ?? null;
132+
if ($data === null && $key !== null && strpos($key, '/') !== false) {
133+
/* process a/b/c key as ['a']['b']['c'] */
133134
$data = $this->getDataByPath($key);
134-
} else {
135-
$data = $this->_getData($key);
136135
}
137136

138137
if ($index !== null) {

0 commit comments

Comments
 (0)