Merge pull request #11092 from MrPetovan/bug/11091-ap-logging
Suppress Type error exception in ActivityPub\Processor
This commit is contained in:
commit
9db339dd9b
|
@ -26,6 +26,7 @@ use Friendica\Content\Text\HTML;
|
|||
use Friendica\Content\Text\Markdown;
|
||||
use Friendica\Core\Logger;
|
||||
use Friendica\Core\Protocol;
|
||||
use Friendica\Core\System;
|
||||
use Friendica\Database\DBA;
|
||||
use Friendica\DI;
|
||||
use Friendica\Model\APContact;
|
||||
|
@ -287,8 +288,12 @@ class Processor
|
|||
|
||||
$item['uri'] = $activity['id'];
|
||||
|
||||
$item['created'] = DateTimeFormat::utc($activity['published']);
|
||||
$item['edited'] = DateTimeFormat::utc($activity['updated']);
|
||||
if (empty($activity['published']) || empty($activity['updated'])) {
|
||||
DI::logger()->notice('published or updated keys are empty for activity', ['activity' => $activity, 'callstack' => System::callstack(10)]);
|
||||
}
|
||||
|
||||
$item['created'] = DateTimeFormat::utc($activity['published'] ?? 'now');
|
||||
$item['edited'] = DateTimeFormat::utc($activity['updated'] ?? 'now');
|
||||
$guid = $activity['sc:identifier'] ?: self::getGUIDByURL($item['uri']);
|
||||
$item['guid'] = $activity['diaspora:guid'] ?: $guid;
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user