Skip to content

Commit 7625dad

Browse files
authored
Update Article.php
1 parent 201c585 commit 7625dad

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/Entity/Article.php

+4-1
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,9 @@ public function getHtml()
6161
*/
6262
public function getDate()
6363
{
64+
if (!isset($this->data['date'])) {
65+
return null;
66+
}
6467
return (class_exists('\Carbon\Carbon')) ?
6568
new \Carbon\Carbon($this->data['date'], 'GMT') :
6669
$this->data['date'];
@@ -268,4 +271,4 @@ public function getEstimatedDate()
268271
new \Carbon\Carbon($date, 'GMT') :
269272
$date;
270273
}
271-
}
274+
}

0 commit comments

Comments
 (0)