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

Commit

Permalink
Merge branch 'spiffy-pr' of https://github.com/EvanDotPro/zf2 into ho…
Browse files Browse the repository at this point in the history
…tfix/di_exception_messages

Conflicts:
	library/Zend/Di/Di.php
  • Loading branch information
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/Di.php
Expand Up @@ -167,7 +167,7 @@ public function newInstance($name, array $params = array(), $isShared = true)

$instantiator = $definitions->getInstantiator($class);
$injectionMethods = $definitions->getMethods($class);

if ($instantiator === '__construct') {
$object = $this->createInstanceViaConstructor($class, $params, $alias);
if (array_key_exists('__construct', $injectionMethods)) {
Expand All @@ -183,9 +183,9 @@ public function newInstance($name, array $params = array(), $isShared = true)
isset($instantiator[1]) ? $instantiator[1] : 'NoMethodGiven'
);
} else {
$msg = 'Invalid instantiator: ' . $instantiator;
$msg = 'Invalid instantiator';
}
throw new \RuntimeException($msg);
throw new \RuntimeException($msg);
}

if ($isShared) {
Expand Down

0 comments on commit 041ae5a

Please sign in to comment.