1
0
Fork 0

Fix fatal error: Uncaught TypeError: Argument 1 passed to Friendica\Model\Post\Media::existsByURIId() must be of the type int, null given

This commit is contained in:
Michael 2021-06-21 03:53:53 +00:00
parent 87a405e0c2
commit d5e5a6ea23

View file

@ -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;
}