fix PHP 8.0 TypeError: Exception::__construct(): Argument #2 ($code) must be of type int, string given

This commit is contained in:
Ralf Becker 2021-11-08 11:36:25 +01:00
parent e888e7863c
commit 9638bddaac

View File

@ -396,7 +396,7 @@ class Sharing
$class = strpos($status, '404') === 0 ? 'EGroupware\Api\Exception\NotFound' : $class = strpos($status, '404') === 0 ? 'EGroupware\Api\Exception\NotFound' :
(strpos($status, '401') === 0 ? 'EGroupware\Api\Exception\NoPermission' : (strpos($status, '401') === 0 ? 'EGroupware\Api\Exception\NoPermission' :
'EGroupware\Api\Exception'); 'EGroupware\Api\Exception');
throw new $class($message, $status); throw new $class($message, (int)$status);
} }
/** /**