Skip to content

Commit 3f70b11

Browse files
committed
Fix according review - change how we manage that plugin in a property array
1 parent 3c0372b commit 3f70b11

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

app/code/Magento/Developer/Model/Di/PluginList.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -143,6 +143,10 @@ private function addPluginToList($pluginInstance, $pluginMethod, $methodTypes, $
143143
{
144144
if ($methodTypes & $typeCode) {
145145
if (!array_key_exists($pluginInstance, $this->pluginList[$this->pluginTypeMapping[$typeCode]])) {
146+
$this->pluginList[$this->pluginTypeMapping[$typeCode]][$pluginInstance] = [];
147+
}
148+
149+
if (!in_array($pluginMethod, $this->pluginList[$this->pluginTypeMapping[$typeCode]][$pluginInstance])) {
146150
$this->pluginList[$this->pluginTypeMapping[$typeCode]][$pluginInstance][] = $pluginMethod;
147151
}
148152
}

0 commit comments

Comments
 (0)