Version 0.5.8

Hotfix: some webmentions can have published values that trip up Carbon.
 In these cases, fallback to the `updated_at` value of the eloquent model
 itself.
 -----BEGIN PGP SIGNATURE-----
 
 iQELBAATCgCTFiEEhBm1odiEyvSwr4+zGyx2r7FshZsFAlkhwFBfFIAAAAAALgAo
 aXNzdWVyLWZwckBub3RhdGlvbnMub3BlbnBncC5maWZ0aGhvcnNlbWFuLm5ldDg0
 MTlCNUExRDg4NENBRjRCMEFGOEZCMzFCMkM3NkFGQjE2Qzg1OUIVHGpvbm55QGpv
 bm55YmFybmVzLnVrAAoJEBssdq+xbIWbz0oBgKCsSjrbsXzwaUQH7C/ZjdC5UoA3
 POCx0pPfNLFcSx1BPZPKLksiZyf/gt2ERfTadwGA0vMTYAMNJqZmrGt2J6KQ8PqF
 Ip6bvzUBLVCOH6Q11yv+7QVrTFNIaBvxpPOWo4Vz
 =3Rv7
 -----END PGP SIGNATURE-----

Merge tag 'v0.5.8' into develop

Version 0.5.8

Hotfix: some webmentions can have published values that trip up Carbon.
In these cases, fallback to the `updated_at` value of the eloquent model
itself.
This commit is contained in:
Jonny Barnes 2017-05-21 17:29:32 +01:00
commit b7573fbeaf
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