Ver código fonte

(refactor) checkHTTPS Looks better this way, also fixes the log

AGuyNamedJens 2 anos atrás
pai
commit
307aaee082
1 arquivos alterados com 3 adições e 3 exclusões
  1. 3 3
      public/install/functions.php

+ 3 - 3
public/install/functions.php

@@ -46,9 +46,9 @@ function checkWriteable(): bool
  */
 function checkHTTPS(): bool
 {
-    wh_log('https: ' . (!empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] !== 'off') ? 'true' : 'false', 'debug');
-    return (!empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] !== 'off')
-        || $_SERVER['SERVER_PORT'] == 443;
+    $isHttps = (!empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] !== 'off') || $_SERVER['SERVER_PORT'] == 443;
+    wh_log('https: ' . $isHttps, 'debug');
+    return $isHttps;
 }
 
 /**