diff --git a/system/src/Grav/Console/Gpm/IndexCommand.php b/system/src/Grav/Console/Gpm/IndexCommand.php index 13e51db19..b0d703e2f 100644 --- a/system/src/Grav/Console/Gpm/IndexCommand.php +++ b/system/src/Grav/Console/Gpm/IndexCommand.php @@ -48,10 +48,11 @@ class IndexCommand extends Command { foreach ($this->data as $type => $packages) { $this->output->writeln("" . ucfirst($type) . " [ " . count($packages) . " ]"); - foreach ($packages as $index => $package) { + $index = 0; + foreach ($packages as $slug => $package) { $this->output->writeln( // index - str_pad($index + 1, 2, '0', STR_PAD_LEFT) . ". " . + str_pad($index+++1, 2, '0', STR_PAD_LEFT) . ". " . // package name "" . str_pad($package->name, 15) . " " . // slug