Merge pull request #9655 from MrPetovan/bug/fatal-errors

Fix several occasional fatal errors
This commit is contained in:
Michael Vogel 2020-12-14 22:11:45 +01:00 committed by GitHub
commit e4228c6218
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 32 additions and 11 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);