Permalink
Browse files

[-] Installer : do not fail on warning when addons modules list empty

  • Loading branch information...
1 parent ba62406 commit a209789020fdd7c2809069f0ee2d8fbcdd77e866 @djfm djfm committed Mar 26, 2013
Showing with 4 additions and 2 deletions.
  1. +4 −2 install-dev/models/install.php
@@ -592,8 +592,10 @@ public function getAddonsModulesList()
$addons_modules = array();
$content = Tools::addonsRequest('install-modules');
$xml = @simplexml_load_string($content, null, LIBXML_NOCDATA);
- foreach ($xml->module as $modaddons)
- $addons_modules[] = array('id_module' => $modaddons->id, 'name' => $modaddons->name);
+
+ if ($xml !== false and isset($xml->module))
+ foreach ($xml->module as $modaddons)
+ $addons_modules[] = array('id_module' => $modaddons->id, 'name' => $modaddons->name);
return $addons_modules;
}

0 comments on commit a209789

Please sign in to comment.