From d5e5a6ea234f6ef6902b930a5419b57c1edcc916 Mon Sep 17 00:00:00 2001 From: Michael Date: Mon, 21 Jun 2021 03:53:53 +0000 Subject: [PATCH] Fix fatal error: Uncaught TypeError: Argument 1 passed to Friendica\Model\Post\Media::existsByURIId() must be of the type int, null given --- src/Model/Item.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Model/Item.php b/src/Model/Item.php index 769a2898aa..5f1aaf3968 100644 --- a/src/Model/Item.php +++ b/src/Model/Item.php @@ -518,7 +518,7 @@ class Item public static function isValid(array $item) { // When there is no content then we don't post it - if (($item['body'] . $item['title'] == '') && !Post\Media::existsByURIId($item['uri-id'])) { + if (($item['body'] . $item['title'] == '') && (empty($item['uri-id']) || !Post\Media::existsByURIId($item['uri-id']))) { Logger::notice('No body, no title.'); return false; }