From 9638bddaac38641ccaa148df83fc1cbf836b3e16 Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Mon, 8 Nov 2021 11:36:25 +0100 Subject: [PATCH] fix PHP 8.0 TypeError: Exception::__construct(): Argument #2 ($code) must be of type int, string given --- api/src/Sharing.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/src/Sharing.php b/api/src/Sharing.php index 7962a0ab4b..13640b379b 100644 --- a/api/src/Sharing.php +++ b/api/src/Sharing.php @@ -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); } /**