Skip to content

Commit

Permalink
Fix: Warning: Undefined array key release_date
Browse files Browse the repository at this point in the history
  • Loading branch information
0m3r committed Sep 6, 2022
1 parent 238bb0f commit c643c62
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion Console/Command/ModuleCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,10 @@ protected function execute(InputInterface $input, OutputInterface $output)

$color = version_compare($item['version'], $item['latest_version'], '>=') ? 'green' : 'red';
$item['version'] = "<fg={$color}>{$item['version']}</>";
$item['release_date'] = date("Y-m-d H:i", strtotime($item['release_date']));
$item['release_date'] = date(
"Y-m-d H:i",
isset($item['release_date']) ? strtotime($item['release_date']) : time()
);

$rows = [];
foreach ($this->getLabelMapping() as $key => $label) {
Expand Down

0 comments on commit c643c62

Please sign in to comment.