diff --git a/raven.module b/raven.module index 202687a..cfc7446 100644 --- a/raven.module +++ b/raven.module @@ -378,7 +378,9 @@ function raven_init() { function raven_signature_check($data, $sig) { $key = openssl_pkey_get_public(get_raven_pubkey()); $result = openssl_verify(rawurldecode($data), raven_signature_decode(rawurldecode($sig)), $key); - openssl_free_key($key); + if (version_compare(PHP_VERSION, '8.0.0', '<')) { + openssl_free_key($key); + } switch ($result) { case 1: return TRUE; @@ -526,7 +528,7 @@ function user_raven_login_register($name) { $edit = array(); $account = user_external_load($name); - if (variable_get('raven_logout_on_browser_close', TRUE) == TRUE) { + if (variable_get('raven_logout_on_browser_close', TRUE) && session_status() !== PHP_SESSION_ACTIVE) { ini_set('session.cookie_lifetime', 0); } diff --git a/tests/features/bootstrap/functions.php b/tests/features/bootstrap/functions.php index 44d1201..4f2d7f7 100644 --- a/tests/features/bootstrap/functions.php +++ b/tests/features/bootstrap/functions.php @@ -182,7 +182,9 @@ function create_raven_response($url, $status = 200, $principal = 'test0001', $pr openssl_sign($data, $signature, $pkeyid); - openssl_free_key($pkeyid); + if (version_compare(PHP_VERSION, '8.0.0', '<')) { + openssl_free_key($pkeyid); + } $signature = preg_replace(