Fix warning "Trying to access array offset on value of type bool"

This commit is contained in:
Michael 2024-12-29 15:51:42 +00:00
parent 4917380716
commit b915252e7e
4 changed files with 18 additions and 3 deletions

View file

@ -215,7 +215,7 @@ class Processor
*/
public static function updateItem(array $activity)
{
$item = Post::selectFirst(['uri', 'uri-id', 'thr-parent', 'gravity', 'post-type', 'private'], ['uri' => $activity['id']]);
$item = Post::selectFirst(['uri', 'uri-id', 'guid', 'thr-parent', 'gravity', 'post-type', 'private'], ['uri' => $activity['id']]);
if (!DBA::isResult($item)) {
DI::logger()->notice('No existing item, item will be created', ['uri' => $activity['id']]);
$item = self::createItem($activity, false);