Skip to content

Commit

Permalink
Fix DELETE /api/extensions/* returning 500 (#1580)
Browse files Browse the repository at this point in the history
* Use extension string as parameter for ::disable & ::uninstall

* Remove repeated 'ExtensionManager::disable' call

* Fix StyleCI
  • Loading branch information
David Sevilla Martín authored and franzliedke committed Dec 12, 2018
1 parent 16eb1fa commit c761802
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/Api/Controller/UninstallExtensionController.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,10 @@ protected function delete(ServerRequestInterface $request)

$name = array_get($request->getQueryParams(), 'name');

$extension = $this->extensions->getExtension($name);
if ($this->extensions->getExtension($name) == null) {
return;
}

$this->extensions->disable($extension);
$this->extensions->uninstall($extension);
$this->extensions->uninstall($name);
}
}

0 comments on commit c761802

Please sign in to comment.