Skip to content

Commit db1ea4e

Browse files
authored
avoid a misconfiguration infinite loop
The virtual type configurations are not supposed to be self‑referential, … but if they ever are this function will spin in an infinite loop.
1 parent ab0c0b5 commit db1ea4e

File tree

1 file changed

+1
-0
lines changed
  • lib/internal/Magento/Framework/ObjectManager/Config

1 file changed

+1
-0
lines changed

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -156,6 +156,7 @@ public function isShared($type)
156156
public function getInstanceType($instanceName)
157157
{
158158
while (isset($this->_virtualTypes[$instanceName])) {
159+
if ($instanceName == $this->_virtualTypes[$instanceName]) break;
159160
$instanceName = $this->_virtualTypes[$instanceName];
160161
}
161162
return $instanceName;

0 commit comments

Comments
 (0)