We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent db1ea4e commit 1f18dbfCopy full SHA for 1f18dbf
lib/internal/Magento/Framework/ObjectManager/Config/Config.php
@@ -152,11 +152,17 @@ public function isShared($type)
152
*
153
* @param string $instanceName
154
* @return mixed
155
+ * @throws \LogicException
156
*/
157
public function getInstanceType($instanceName)
158
{
159
while (isset($this->_virtualTypes[$instanceName])) {
- if ($instanceName == $this->_virtualTypes[$instanceName]) break;
160
+ if ($instanceName == $this->_virtualTypes[$instanceName]) {
161
+ throw new \LogicException(
162
+ 'unsupported self-referencing virutal type: '
163
+ .$instanceName
164
+ );
165
+ }
166
$instanceName = $this->_virtualTypes[$instanceName];
167
}
168
return $instanceName;
0 commit comments