소스 검색

[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 년 전
부모
커밋
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();
     }
 
     /**