Array key check for _SERVER['HTTPS']
Preventing a PHP warning
This commit is contained in:
parent
3f70ec0381
commit
90e09c35cd
1 changed files with 1 additions and 1 deletions
|
@ -55,7 +55,7 @@ abstract class Page
|
||||||
if ( $rc{0} != '/' ) {
|
if ( $rc{0} != '/' ) {
|
||||||
$rc = $this->baseURL . '/' . $rc;
|
$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;
|
. ':' . $_SERVER[ 'SERVER_PORT' ] . $rc;
|
||||||
header( "Location: $rc" );
|
header( "Location: $rc" );
|
||||||
$rv = true;
|
$rv = true;
|
||||||
|
|
Loading…
Reference in a new issue