Skip to content

Commit

Permalink
Error 500 in Module Manager
Browse files Browse the repository at this point in the history
There is an error in Module Manager (http://store.com/setup/index.php/moduleGrid/modules) if some module has no "moduleName" property:
```
{
  "name": "amzn\/amazon-pay-and-login-magento-2-module",
  "type": "magento2-module",
  "version": "2.0.4"
}
```
  • Loading branch information
flancer64 authored and vijay-wagento committed Jun 4, 2018
1 parent 943e2cd commit 486f7a7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion setup/src/Magento/Setup/Model/Grid/Module.php
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ private function getModulesInfo(array $moduleList)
private function addGeneralInfo(array $items)
{
foreach ($items as &$item) {
$item['moduleName'] = $item['moduleName'] ?: $this->packageInfo->getModuleName($item['name']);
$item['moduleName'] = isset($item['moduleName']) ? $item['moduleName'] : $this->packageInfo->getModuleName($item['name']);
$item['enable'] = $this->moduleList->has($item['moduleName']);
$vendorSource = $item['name'] == self::UNKNOWN_PACKAGE_NAME ? $item['moduleName'] : $item['name'];
$item['vendor'] = ucfirst(current(preg_split('%[/_]%', $vendorSource)));
Expand Down

0 comments on commit 486f7a7

Please sign in to comment.