Skip to content

Commit afa6914

Browse files
Merge remote-tracking branch '38794/ergohack-patch-4' into 37018-test
2 parents bb83e21 + aff5fc0 commit afa6914

File tree

1 file changed

+9
-2
lines changed
  • lib/internal/Magento/Framework/ObjectManager/Config

1 file changed

+9
-2
lines changed

lib/internal/Magento/Framework/ObjectManager/Config/Config.php

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?php
22
/**
3-
* Copyright © Magento, Inc. All rights reserved.
4-
* See COPYING.txt for license details.
3+
* Copyright 2013 Adobe
4+
* All Rights Reserved.
55
*/
66
namespace Magento\Framework\ObjectManager\Config;
77

@@ -152,10 +152,17 @@ public function isShared($type)
152152
*
153153
* @param string $instanceName
154154
* @return mixed
155+
* @throws \LogicException
155156
*/
156157
public function getInstanceType($instanceName)
157158
{
158159
while (isset($this->_virtualTypes[$instanceName])) {
160+
if ($instanceName === $this->_virtualTypes[$instanceName]) {
161+
throw new \LogicException(
162+
'unsupported self-referencing virtual type: '
163+
.$instanceName
164+
);
165+
}
159166
$instanceName = $this->_virtualTypes[$instanceName];
160167
}
161168
return $instanceName;

0 commit comments

Comments
 (0)