Selaa lähdekoodia

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

AGuyNamedJens 2 vuotta sitten
vanhempi
commit
307aaee082
1 muutettua tiedostoa jossa 3 lisäystä ja 3 poistoa
  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;
 }
 
 /**