1
0
Fork 0

Issue #1056. Fixed callback call error on search command.

pull/1073/head
Povilas Balzaravicius Pawka 2012-09-06 09:12:28 +03:00
parent 0689e24e83
commit 57d1b5a37d
2 changed files with 3 additions and 3 deletions

View File

@ -118,7 +118,7 @@ class ArrayRepository implements RepositoryInterface
public function filterPackages($callback, $class = 'Composer\Package\Package') public function filterPackages($callback, $class = 'Composer\Package\Package')
{ {
foreach ($this->getPackages() as $package) { foreach ($this->getPackages() as $package) {
if (false === $callback($package)) { if (false === call_user_func($callback, $package)) {
return false; return false;
} }
} }

View File

@ -135,11 +135,11 @@ class ComposerRepository extends ArrayRepository implements NotifiableRepository
} }
foreach ($this->rawData as $package) { foreach ($this->rawData as $package) {
if (false === $callback($package = $this->loader->load($package, $class))) { if (false === call_user_func($callback, $package = $this->loader->load($package, $class))) {
return false; return false;
} }
if ($package->getAlias()) { if ($package->getAlias()) {
if (false === $callback($this->createAliasPackage($package))) { if (false === call_user_func($callback, $this->createAliasPackage($package))) {
return false; return false;
} }
} }