Skip to content

Commit

Permalink
Merge pull request #243 from Seb-C/fix/crash_dependencies_not_found
Browse files Browse the repository at this point in the history
Uninstalling dependencies instead of crashing
  • Loading branch information
jguyomard authored Nov 21, 2016
2 parents 2d9d845 + 6436051 commit f73319e
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions framework/classes/application.php
Original file line number Diff line number Diff line change
Expand Up @@ -443,11 +443,10 @@ public function uninstall()
{
if (!$this->canUninstall()) {
$dependents = $this->installedDependentApplications();
throw new \Exception(
'Application '.$this->folder.
' can\'t be uninstalled because it is required by the following applications: '.
implode(', ', $dependents).'.'
);
foreach($dependents as $dependent_name) {
$dependent = static::forge($dependent_name);
$dependent->uninstall();
}
}
$old_metadata = \Arr::get(static::$rawAppInstalled, $this->folder);
$new_metadata = array();
Expand Down

0 comments on commit f73319e

Please sign in to comment.