We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9e6ac30 commit 9b2cdf6Copy full SHA for 9b2cdf6
lib/Varien/Object.php
@@ -111,12 +111,13 @@ public function __construct()
111
112
protected function _addFullNames()
113
{
114
- $existedShortKeys = array_intersect($this->_syncFieldsMap, array_keys($this->_data));
115
- if (!empty($existedShortKeys)) {
116
- foreach ($existedShortKeys as $key) {
117
- $fullFieldName = array_search($key, $this->_syncFieldsMap);
118
- $this->_data[$fullFieldName] = $this->_data[$key];
119
- }
+ if (empty($this->_syncFieldsMap)) {
+ return;
+ }
+
+ $existedShortKeys = array_intersect_key(array_flip($this->_syncFieldsMap), $this->_data);
+ foreach ($existedShortKeys as $key => $fullFieldName) {
120
+ $this->_data[$fullFieldName] = $this->_data[$key];
121
}
122
123
0 commit comments