Merge pull request #12972 from MrPetovan/bug/fatal-errors

Address a couple of fatal errors
This commit is contained in:
Philipp 2023-04-03 19:47:10 +02:00 committed by GitHub
commit 6dc3643409
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -31,6 +31,7 @@ use Friendica\Core\System;
use Friendica\Core\Worker;
use Friendica\Database\DBA;
use Friendica\DI;
use Friendica\Network\HTTPException\InternalServerErrorException;
use Friendica\Protocol\Activity;
use Friendica\Protocol\ActivityPub;
use Friendica\Protocol\Delivery;
@ -1394,10 +1395,16 @@ class Item
*
* @param integer $uri_id
* @return void
* @throws InternalServerErrorException
* @throws \ImagickException
*/
public static function updateDisplayCache(int $uri_id)
{
$item = Post::selectFirst(self::DISPLAY_FIELDLIST, ['uri-id' => $uri_id]);
if (!$item) {
return;
}
self::prepareBody($item, false, false, true);
}
@ -3042,7 +3049,11 @@ class Item
}
if (!empty($quote_uri_id)) {
if (isset($shared_item['plink'])) {
$item['body'] .= "\n" . DI::contentItem()->createSharedBlockByArray($shared_item);
} else {
DI::logger()->warning('Missing plink in shared item', ['item' => $item, 'shared' => $shared, 'quote_uri_id' => $quote_uri_id, 'shared_item' => $shared_item]);
}
}
if (!empty($shared_item['uri-id'])) {