Fix stickler

Signed-off-by: RD WebDesign <github@rdwebdesign.com.br>
This commit is contained in:
RD WebDesign 2022-03-23 18:45:18 -03:00
parent c9809371ab
commit f8e84b3c3f

View file

@ -167,8 +167,7 @@ function queryAds($serverName) {
// Determine which protocol should be used // Determine which protocol should be used
$protocol = "http"; $protocol = "http";
if ( if ((isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] === 'on') ||
(isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] === 'on') ||
(isset($_SERVER['REQUEST_SCHEME']) && $_SERVER['REQUEST_SCHEME'] === 'https') || (isset($_SERVER['REQUEST_SCHEME']) && $_SERVER['REQUEST_SCHEME'] === 'https') ||
(isset($_SERVER['HTTP_X_FORWARDED_PROTO']) && $_SERVER['HTTP_X_FORWARDED_PROTO'] === 'https') (isset($_SERVER['HTTP_X_FORWARDED_PROTO']) && $_SERVER['HTTP_X_FORWARDED_PROTO'] === 'https')
) { ) {
@ -191,7 +190,7 @@ function queryAds($serverName) {
$queryAds = array_values(array_filter(preg_replace("/data:\s+/", "", $queryAdsFile))); $queryAds = array_values(array_filter(preg_replace("/data:\s+/", "", $queryAdsFile)));
} else { } else {
// if not an array, return an error message // if not an array, return an error message
return array("0" => "error", "1" => "<br>Not an array: (".gettype($queryAdsFile).")<br>".print_r($queryAdsFile, true)); return array("0" => "error", "1" => "<br>(".gettype($queryAdsFile).")<br>".print_r($queryAdsFile, true));
} }
$queryTime = sprintf("%.0f", (microtime(true)-$_SERVER["REQUEST_TIME_FLOAT"]) - $preQueryTime); $queryTime = sprintf("%.0f", (microtime(true)-$_SERVER["REQUEST_TIME_FLOAT"]) - $preQueryTime);