From 90e09c35cd24a19093048e3fec497a5b4a7a7753 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emmanuel=20Beno=C3=AEt?= Date: Fri, 1 Jan 2016 23:39:16 +0100 Subject: [PATCH] Array key check for _SERVER['HTTPS'] Preventing a PHP warning --- includes/core/page.inc.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/includes/core/page.inc.php b/includes/core/page.inc.php index 704ec12..ee08a65 100644 --- a/includes/core/page.inc.php +++ b/includes/core/page.inc.php @@ -55,7 +55,7 @@ abstract class Page if ( $rc{0} != '/' ) { $rc = $this->baseURL . '/' . $rc; } - $rc = ( $_SERVER[ 'HTTPS' ] ? 'https' : 'http' ) . '://' . $_SERVER[ 'SERVER_NAME' ] + $rc = ( ( array_key_exists( 'HTTPS' , $_SERVER ) && $_SERVER[ 'HTTPS' ] ) ? 'https' : 'http' ) . '://' . $_SERVER[ 'SERVER_NAME' ] . ':' . $_SERVER[ 'SERVER_PORT' ] . $rc; header( "Location: $rc" ); $rv = true;