From 18c104854dafa53724c03521a4d36d3a04f241e1 Mon Sep 17 00:00:00 2001 From: ozh Date: Wed, 19 Apr 2017 23:30:13 +0200 Subject: [PATCH] No more PHP 5.2 checks --- includes/functions-auth.php | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/includes/functions-auth.php b/includes/functions-auth.php index 0831790..e637c70 100644 --- a/includes/functions-auth.php +++ b/includes/functions-auth.php @@ -412,12 +412,7 @@ function yourls_store_cookie( $user = null ) { $domain = ''; if ( !headers_sent( $filename, $linenum ) ) { - // Set httponly if the php version is >= 5.2.0 - if( version_compare( phpversion(), '5.2.0', 'ge' ) ) { - setcookie( yourls_cookie_name(), yourls_salt( $user ), $time, '/', $domain, $secure, $httponly ); - } else { - setcookie( yourls_cookie_name(), yourls_salt( $user ), $time, '/', $domain, $secure ); - } + setcookie( yourls_cookie_name(), yourls_salt( $user ), $time, '/', $domain, $secure, $httponly ); } else { // For some reason cookies were not stored: action to be able to debug that yourls_do_action( 'setcookie_failed', $user ); -- 2.45.0