Permalink
Browse files

Fix issue with undefined variable

  • Loading branch information...
1 parent 8b7c447 commit e6befc8ea79b970614c7530eb362e61665b160a1 @damianb damianb committed Oct 28, 2011
Showing with 9 additions and 2 deletions.
  1. +9 −2 Loader.php
View
@@ -179,7 +179,15 @@ public function load($addon, $alias_as = '', $ignore_phar = false)
}
// Load the metadata object
- $metadata = $this->loadMetadata($metadata_class);
+ try
+ {
+ $metadata = $this->loadMetadata($metadata_class);
+ }
+ catch(DependencyException $e)
+ {
+ $this->metadata[$addon] = false;
+ throw $e;
+ }
// If the addon's metadata object passes all checks and we're not using a phar file, then we add the addon's directory to the autoloader include path
if($using_phar)
@@ -275,7 +283,6 @@ protected function loadMetadata($metadata_class)
}
catch(\RuntimeException $e)
{
- $this->metadata[$addon] = false;
throw new DependencyException(sprintf('Dependency check failed, reason: %1$s', $e->getMessage()));
}

0 comments on commit e6befc8

Please sign in to comment.