This commit is contained in:
Jonny Barnes 2017-05-21 17:19:38 +01:00
parent 9e2b930634
commit 41ea6c3b29
2 changed files with 10 additions and 3 deletions

View file

@ -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();
}

View file

@ -1,5 +1,8 @@
# Changelog
## Version 0.5.8 (2017-05-21)
- Hotfix: if Carbon cant parse the supplied published date of a webmention, use the Models `updated_at` value
## Version 0.5.7 (2017-05-19)
- Hotfix: make sure `mpSyndicateTo` variable exists when accessed in if statements