diff --git a/app/code/Magento/Backend/Block/Menu.php b/app/code/Magento/Backend/Block/Menu.php index 9dc4094a83e91..280cd949a5984 100644 --- a/app/code/Magento/Backend/Block/Menu.php +++ b/app/code/Magento/Backend/Block/Menu.php @@ -226,7 +226,7 @@ protected function _renderAnchor($menuItem, $level) */ protected function _getMenuIterator($menu) { - return $this->_iteratorFactory->create(array('iterator' => $menu->getIterator())); + return $this->_iteratorFactory->create(array($menu->getIterator())); } /** diff --git a/lib/Magento/ObjectManager/Factory/Factory.php b/lib/Magento/ObjectManager/Factory/Factory.php index 539ad7ecaaa51..4623e56566848 100644 --- a/lib/Magento/ObjectManager/Factory/Factory.php +++ b/lib/Magento/ObjectManager/Factory/Factory.php @@ -91,11 +91,13 @@ protected function _resolveArguments($requestedType, array $parameters, array $a { $resolvedArguments = array(); $arguments = $this->_config->getArguments($requestedType, $arguments); - foreach ($parameters as $parameter) { + foreach ($parameters as $key => $parameter) { list($paramName, $paramType, $paramRequired, $paramDefault) = $parameter; $argument = null; if (array_key_exists($paramName, $arguments)) { $argument = $arguments[$paramName]; + } elseif (isset($arguments[$key])) { + $argument = $arguments[$key]; } elseif (array_key_exists('options', $arguments) && array_key_exists($paramName, $arguments['options'])) { // The parameter name doesn't exist in the arguments, but it is contained in the 'options' argument. $argument = $arguments['options'][$paramName];