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 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 */
66namespace 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 ;
You can’t perform that action at this time.
0 commit comments