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

This change removes a lot of noise in the dumped container.
This commit is contained in:
Fabien Potencier 2011-01-05 14:42:38 +01:00
parent 598d458a3c
commit fc96702483

View File

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