Skip to content

Commit

Permalink
Fix PHP warnings in docker (Complement of #2316) (#2318)
Browse files Browse the repository at this point in the history
  • Loading branch information
PromoFaux authored Sep 2, 2022
2 parents 775a4e1 + 8aa2e52 commit 9c01f7b
Showing 1 changed file with 16 additions and 7 deletions.
23 changes: 16 additions & 7 deletions scripts/pi-hole/php/update_checker.php
Original file line number Diff line number Diff line change
Expand Up @@ -71,18 +71,27 @@ function checkUpdate($currentVersion, $latestVersion)
$docker_latest = '';
}

$core_update = false;
$web_update = false;
$FTL_update = false;

// Version comparison
if (!$docker_current) {
// Not a docker container
if ($docker_current) {
// It's a container: do not check for individual component updates
if ($docker_current == 'nightly' || $docker_current == 'dev') {
// Special container - no update messages
$docker_update = false;
} else {
$docker_update = checkUpdate($docker_current, $docker_latest);
}
} else {
// Components comparison
$core_update = checkUpdate($core_current, $core_latest);
$web_update = checkUpdate($web_current, $web_latest);
$FTL_update = checkUpdate($FTL_current, $FTL_latest);

// Not a docker container
$docker_update = false;
} elseif ($docker_current == 'nightly' || $docker_current == 'dev') {
// Special container - no update messages
$docker_update = false;
} else {
$docker_update = checkUpdate($docker_current, $docker_latest);
}
}

Expand Down

0 comments on commit 9c01f7b

Please sign in to comment.