From 7ebbb6b2ca52e122adfca88e4b9a2805863e43d3 Mon Sep 17 00:00:00 2001 From: Côme Chilliet Date: Mon, 7 Nov 2022 10:54:02 +0100 Subject: Remove workarounds specific to 7.4 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Côme Chilliet --- apps/encryption/lib/Crypto/Crypt.php | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'apps/encryption') diff --git a/apps/encryption/lib/Crypto/Crypt.php b/apps/encryption/lib/Crypto/Crypt.php index 8bfeb0c7a68..efb5a6868b0 100644 --- a/apps/encryption/lib/Crypto/Crypt.php +++ b/apps/encryption/lib/Crypto/Crypt.php @@ -316,8 +316,8 @@ class Crypt { throw new \InvalidArgumentException( sprintf( - 'Unsupported cipher (%s) defined.', - $cipher + 'Unsupported cipher (%s) defined.', + $cipher ) ); } @@ -470,8 +470,7 @@ class Crypt { */ protected function isValidPrivateKey($plainKey) { $res = openssl_get_privatekey($plainKey); - // TODO: remove resource check one php7.4 is not longer supported - if (is_resource($res) || (is_object($res) && get_class($res) === 'OpenSSLAsymmetricKey')) { + if (is_object($res) && get_class($res) === 'OpenSSLAsymmetricKey') { $sslInfo = openssl_pkey_get_details($res); if (isset($sslInfo['key'])) { return true; -- cgit v1.2.3