Просмотр исходного кода

[DependencyInjection] fixed generation of empty tags when getting a tag from a definition

This change removes a lot of noise in the dumped container.
Fabien Potencier 14 лет назад
Родитель
Сommit
fc96702483
1 измененных файлов с 1 добавлено и 5 удалено
  1. 1 5
      src/Symfony/Component/DependencyInjection/Definition.php

+ 1 - 5
src/Symfony/Component/DependencyInjection/Definition.php

@@ -253,11 +253,7 @@ class Definition
      */
     public function getTag($name)
     {
-        if (!isset($this->tags[$name])) {
-            $this->tags[$name] = array();
-        }
-
-        return $this->tags[$name];
+        return isset($this->tags[$name]) ? $this->tags[$name] : array();
     }
 
     /**