Check if $_SERVER['HTTPS'] is set
This commit is contained in:
		| @@ -1,7 +1,8 @@ | ||||
| <?php | ||||
| function get_protocol() { | ||||
| 	$protocol = "http"; | ||||
| 	if ( (!empty($_SERVER['HTTPS'] && $_SERVER['HTTPS'] !== 'off') || | ||||
| 	if ( (isset($_SERVER['HTTPS']) && !empty($_SERVER['HTTPS'] | ||||
| 			&& $_SERVER['HTTPS'] !== 'off') || | ||||
| 			$_SERVER['SERVER_PORT'] == 443) ) | ||||
| 		$protocol = "https"; | ||||
| 	return $protocol."://"; | ||||
|   | ||||
		Reference in New Issue
	
	Block a user