1
0
Fork 0

addPackage needs to trigger initialization too

pull/1/head
Jordi Boggiano 2011-05-22 09:10:03 +02:00
parent 575e520931
commit 05d527446b
1 changed files with 3 additions and 0 deletions

View File

@ -30,6 +30,9 @@ class ArrayRepository implements RepositoryInterface
*/
public function addPackage(PackageInterface $package)
{
if (null === $this->packages) {
$this->initialize();
}
$package->setRepository($this);
$this->packages[] = $package;
}