Return early if an URI id cannot be obtained in ActivityPub\Processor::createItem

- Address https://github.com/friendica/friendica/issues/9250#issuecomment-743769813
This commit is contained in:
Hypolite Petovan 2020-12-13 13:42:08 -05:00
parent 61aa4efa89
commit 0441b912ac
2 changed files with 6 additions and 2 deletions

View file

@ -31,10 +31,10 @@ class ItemURI
*
* @param array $fields Item-uri fields
*
* @return integer item-uri id
* @return int|null item-uri id
* @throws \Exception
*/
public static function insert($fields)
public static function insert(array $fields)
{
// If the URI gets too long we only take the first parts and hope for best
$uri = substr($fields['uri'], 0, 255);