From 7020030c1725eec59f131a1e747ecead6c3c9c0f Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Tue, 9 Nov 2021 08:02:49 +0100 Subject: [PATCH] fix PHP 8.0 problem "new" > 0 causing mail accounts created via admin for an other user to fail --- api/src/Mail/Account.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/src/Mail/Account.php b/api/src/Mail/Account.php index 3fcc988a9a..6d962be7a2 100644 --- a/api/src/Mail/Account.php +++ b/api/src/Mail/Account.php @@ -1172,7 +1172,7 @@ class Account implements \ArrayAccess } // store account data - if (!($data['acc_id'] > 0)) + if (!(int)$data['acc_id']) { // set not set values which, are NOT NULL and therefore would give an SQL error $td = self::$db->get_table_definitions('api', self::TABLE);