Browse Source

Search: initialize lowMatches as empty array.

Povilas Balzaravicius Pawka 12 years ago
parent
commit
bbac63821c
1 changed files with 3 additions and 5 deletions
  1. 3 5
      src/Composer/Command/SearchCommand.php

+ 3 - 5
src/Composer/Command/SearchCommand.php

@@ -27,7 +27,7 @@ use Composer\Factory;
 class SearchCommand extends Command
 {
     protected $matches;
-    protected $lowMatches;
+    protected $lowMatches = array();
     protected $tokens;
     protected $output;
 
@@ -67,10 +67,8 @@ EOT
         $this->output = $output;
         $repos->filterPackages(array($this, 'processPackage'), 'Composer\Package\CompletePackage');
 
-        if (!empty($this->lowMatches)) {
-            foreach ($this->lowMatches as $details) {
-                $output->writeln($details['name'] . '<comment>:</comment> '. $details['description']);
-            }
+        foreach ($this->lowMatches as $details) {
+            $output->writeln($details['name'] . '<comment>:</comment> '. $details['description']);
         }
     }