[3.2] Prevent double registrations related to tag priorities
This commit is contained in:
parent
0834f133ec
commit
ec6a2f9eba
@ -40,12 +40,10 @@ trait PriorityTaggedServiceTrait
|
||||
{
|
||||
$services = array();
|
||||
|
||||
foreach ($container->findTaggedServiceIds($tagName) as $serviceId => $tags) {
|
||||
foreach ($tags as $attributes) {
|
||||
$priority = isset($attributes['priority']) ? $attributes['priority'] : 0;
|
||||
foreach ($container->findTaggedServiceIds($tagName) as $serviceId => $attributes) {
|
||||
$priority = isset($attributes[0]['priority']) ? $attributes[0]['priority'] : 0;
|
||||
$services[$priority][] = new Reference($serviceId);
|
||||
}
|
||||
}
|
||||
|
||||
if ($services) {
|
||||
krsort($services);
|
||||
|
Reference in New Issue
Block a user