Merge pull request #5452 from MrPetovan/bug/5443-fix-worker-notices

Fix notices in OEmbed et al.
This commit is contained in:
Michael Vogel 2018-07-24 17:11:53 +02:00 committed by GitHub
commit 5a8654194a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 169 additions and 109 deletions

View file

@ -1330,8 +1330,6 @@ class Item extends BaseObject
$item['uri-hash'] = $existing['uri-hash'];
}
self::addLanguageToItemArray($item);
$item['wall'] = intval(defaults($item, 'wall', 0));
$item['extid'] = trim(defaults($item, 'extid', ''));
$item['author-name'] = trim(defaults($item, 'author-name', ''));
@ -1383,6 +1381,8 @@ class Item extends BaseObject
return 0;
}
self::addLanguageToItemArray($item);
// Items cannot be stored before they happen ...
if ($item['created'] > DateTimeFormat::utcNow()) {
$item['created'] = DateTimeFormat::utcNow();