From 2eea30a908c62325c0fce6d1d9b1d23f557f44b1 Mon Sep 17 00:00:00 2001 From: Sebastien MALOT Date: Thu, 23 Mar 2017 19:19:55 +0100 Subject: [PATCH] Update Release.php --- lib/Cerbere/Model/Release.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/Cerbere/Model/Release.php b/lib/Cerbere/Model/Release.php index bc16dbe..6c5ca8d 100644 --- a/lib/Cerbere/Model/Release.php +++ b/lib/Cerbere/Model/Release.php @@ -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; } /**