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 7792c706a6
commit 02270f63fb

View File

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