Merge pull request #10419 from annando/fatal
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:
commit
1f69797a9a
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user