Skip to content

Commit

Permalink
Uninstalling dependencies instead of crashing
Browse files Browse the repository at this point in the history
  • Loading branch information
Sébastien CAPARROS committed Apr 15, 2016
1 parent 844a822 commit 6436051
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 6436051

Please sign in to comment.