Skip to content

Commit f6f3cf8

Browse files
committed
MAGETWO-59641: Production mode cannot be enabled
1 parent 246c630 commit f6f3cf8

File tree

1 file changed

+9
-14
lines changed
  • lib/internal/Magento/Framework/ObjectManager/Config

1 file changed

+9
-14
lines changed

lib/internal/Magento/Framework/ObjectManager/Config/Compiled.php

Lines changed: 9 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -129,20 +129,15 @@ public function getPreference($type)
129129
*/
130130
public function extend(array $configuration)
131131
{
132-
$properties = [
133-
'arguments' => 'arguments',
134-
'instanceTypes' => 'virtualTypes',
135-
'preferences' => 'preferences'
136-
];
137-
138-
foreach ($configuration as $key => $config) {
139-
if (empty($properties[$key])) {
140-
continue;
141-
}
142-
143-
$property = $properties[$key];
144-
$this->$property = array_replace($this->$property, $config);
145-
}
132+
$this->arguments = isset($configuration['arguments'])
133+
? array_replace($this->arguments, $configuration['arguments'])
134+
: $this->arguments;
135+
$this->virtualTypes = isset($configuration['instanceTypes'])
136+
? array_replace($this->virtualTypes, $configuration['instanceTypes'])
137+
: $this->virtualTypes;
138+
$this->preferences = isset($configuration['preferences'])
139+
? array_replace($this->preferences, $configuration['preferences'])
140+
: $this->preferences;
146141
}
147142

148143
/**

0 commit comments

Comments
 (0)