File tree Expand file tree Collapse file tree 1 file changed +9
-2
lines changed
lib/internal/Magento/Framework/ObjectManager/Config Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Original file line number Diff line number Diff line change 1
1
<?php
2
2
/**
3
- * Copyright © Magento, Inc. All rights reserved.
4
- * See COPYING.txt for license details .
3
+ * Copyright 2013 Adobe
4
+ * All Rights Reserved .
5
5
*/
6
6
namespace Magento \Framework \ObjectManager \Config ;
7
7
@@ -152,10 +152,17 @@ public function isShared($type)
152
152
*
153
153
* @param string $instanceName
154
154
* @return mixed
155
+ * @throws \LogicException
155
156
*/
156
157
public function getInstanceType ($ instanceName )
157
158
{
158
159
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
+ }
159
166
$ instanceName = $ this ->_virtualTypes [$ instanceName ];
160
167
}
161
168
return $ instanceName ;
You can’t perform that action at this time.
0 commit comments