Skip to content

Commit

Permalink
Update Article.php
Browse files Browse the repository at this point in the history
  • Loading branch information
Swader authored Jul 8, 2017
1 parent 201c585 commit 7625dad
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/Entity/Article.php
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,9 @@ public function getHtml()
*/
public function getDate()
{
if (!isset($this->data['date'])) {
return null;
}
return (class_exists('\Carbon\Carbon')) ?
new \Carbon\Carbon($this->data['date'], 'GMT') :
$this->data['date'];
Expand Down Expand Up @@ -268,4 +271,4 @@ public function getEstimatedDate()
new \Carbon\Carbon($date, 'GMT') :
$date;
}
}
}

0 comments on commit 7625dad

Please sign in to comment.