Skip to content

Commit

Permalink
Update Release.php
Browse files Browse the repository at this point in the history
  • Loading branch information
smalot authored Mar 23, 2017
1 parent fa51a87 commit 2eea30a
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion lib/Cerbere/Model/Release.php
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,11 @@ public function __construct($data)
*/
public function getDate()
{
return new \DateTime('@' . $this->getDatestamp());
if ($timestamp = $this->getDatestamp()) {
return new \DateTime('@' . $timestamp);
}

return null;
}

/**
Expand Down

0 comments on commit 2eea30a

Please sign in to comment.