mirror of
https://github.com/pi-hole/pi-hole
synced 2024-12-22 23:08:07 +00:00
Fix stickler
Signed-off-by: RD WebDesign <github@rdwebdesign.com.br>
This commit is contained in:
parent
c9809371ab
commit
f8e84b3c3f
@ -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);
|
||||||
|
Loading…
Reference in New Issue
Block a user