Skip to content

Commit

Permalink
[-] BO: fix $module_name not defined when you reach the catch in impo…
Browse files Browse the repository at this point in the history
…rtModuleAction
  • Loading branch information
PrestaEdit committed Mar 7, 2016
1 parent 93870a1 commit 488c594
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 488c594

Please sign in to comment.