diff --git a/src/Composer/Command/SearchCommand.php b/src/Composer/Command/SearchCommand.php
index 1b3a535a0..b852314fc 100644
--- a/src/Composer/Command/SearchCommand.php
+++ b/src/Composer/Command/SearchCommand.php
@@ -67,8 +67,10 @@ EOT
$this->output = $output;
$repos->filterPackages(array($this, 'processPackage'), 'Composer\Package\CompletePackage');
- foreach ($this->lowMatches as $details) {
- $output->writeln($details['name'] . ': '. $details['description']);
+ if (!empty($this->lowMatches)) {
+ foreach ($this->lowMatches as $details) {
+ $output->writeln($details['name'] . ': '. $details['description']);
+ }
}
}