diff --git a/system/src/Grav/Console/Gpm/IndexCommand.php b/system/src/Grav/Console/Gpm/IndexCommand.php index b258e0250..80c535d70 100644 --- a/system/src/Grav/Console/Gpm/IndexCommand.php +++ b/system/src/Grav/Console/Gpm/IndexCommand.php @@ -113,12 +113,13 @@ class IndexCommand extends ConsoleCommand foreach ($data as $type => $packages) { $this->output->writeln("" . strtoupper($type) . " [ " . count($packages) . " ]"); - - $table = []; - $index = 0; $packages = $this->sort($packages); if (!empty($packages)) { + + $table = []; + $index = 0; + foreach ($packages as $slug => $package) { $row = [ 'Count' => $index++ + 1,