Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

fix BC

  • Loading branch information...
commit 0a5616382cd0da21a9b9e6a40ea719b4f0bb0795 1 parent f69a41a
@stefanotorresi authored
Showing with 4 additions and 2 deletions.
  1. +4 −2 library/Zend/ServiceManager/ServiceManager.php
View
6 library/Zend/ServiceManager/ServiceManager.php
@@ -1042,8 +1042,10 @@ protected function createDelegatorFromFactory($canonicalName, $requestedName)
$delegatorFactory = $this->delegators[$canonicalName][$i];
- if (is_string($delegatorFactory) && class_exists($delegatorFactory, true)) {
- $delegatorFactory = new $delegatorFactory;
+ if (is_string($delegatorFactory)) {
+ $delegatorFactory = !$this->has($delegatorFactory) && class_exists($delegatorFactory, true) ?
+ new $delegatorFactory
+ : $this->get($delegatorFactory);
$this->delegators[$canonicalName][$i] = $delegatorFactory;
}
Please sign in to comment.
Something went wrong with that request. Please try again.