Skip to content

Commit

Permalink
Merge pull request #5144 from prestamodule/patch-45
Browse files Browse the repository at this point in the history
[-] BO: fix $module_name not defined in import module
  • Loading branch information
tchauviere committed Mar 8, 2016
2 parents 0d74e0c + 488c594 commit dc54666
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/PrestaShopBundle/Controller/Admin/ModuleController.php
Original file line number Diff line number Diff line change
Expand Up @@ -231,8 +231,10 @@ public function importModuleAction(Request $request)
array( 'Content-Type' => 'application/json' )
);
} catch (Exception $e) {
$modulesProvider = $this->container->get('prestashop.core.admin.data_provider.module_interface');
$modulesProvider->removeModuleFromDisk($module_name);
if (isset($module_name)) {
$modulesProvider = $this->container->get('prestashop.core.admin.data_provider.module_interface');
$modulesProvider->removeModuleFromDisk($module_name);
}
return new JsonResponse(array(
'status' => false,
'msg' => $e->getMessage()),
Expand Down

0 comments on commit dc54666

Please sign in to comment.