Fix issue #51
This commit is contained in:
parent
9e2b930634
commit
41ea6c3b29
2 changed files with 10 additions and 3 deletions
|
@ -112,9 +112,13 @@ class NotesController extends Controller
|
|||
case 'in-reply-to':
|
||||
$content['source'] = $webmention->source;
|
||||
if (isset($microformats['items'][0]['properties']['published'][0])) {
|
||||
$content['date'] = $carbon->parse(
|
||||
$microformats['items'][0]['properties']['published'][0]
|
||||
)->toDayDateTimeString();
|
||||
try {
|
||||
$content['date'] = $carbon->parse(
|
||||
$microformats['items'][0]['properties']['published'][0]
|
||||
)->toDayDateTimeString();
|
||||
} catch (\Exception $exception) {
|
||||
$content['date'] = $webmention->updated_at->toDayDateTimeString();
|
||||
}
|
||||
} else {
|
||||
$content['date'] = $webmention->updated_at->toDayDateTimeString();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue