Skip to content
This repository has been archived by the owner on Feb 6, 2020. It is now read-only.

Commit

Permalink
Merge branch 'hotfix/servicemanager_instance_check' of https://github…
Browse files Browse the repository at this point in the history
  • Loading branch information
EvanDotPro committed May 26, 2012
3 parents 1f87514 + 8896fc2 + 32a6a82 commit ea247e3
Showing 1 changed file with 9 additions and 12 deletions.
21 changes: 9 additions & 12 deletions src/ServiceManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -287,19 +287,16 @@ public function get($name, $usePeeringServiceManagers = true)
}
}

// Still no instance? raise an exception
if (!$instance) {

// Still no instance? raise an exception
if (!$instance) {
throw new Exception\ServiceNotCreatedException(sprintf(
'%s was unable to fetch or create an instance for %s',
__METHOD__,
$name
),
null,
($selfException === null) ? null : $selfException->getPrevious()
);
}
throw new Exception\ServiceNotCreatedException(sprintf(
'%s was unable to fetch or create an instance for %s',
__METHOD__,
$name
),
null,
($selfException === null) ? null : $selfException->getPrevious()
);
}

if (isset($this->shared[$cName]) && $this->shared[$cName] === true) {
Expand Down

0 comments on commit ea247e3

Please sign in to comment.