diff --git a/validate.php b/validate.php index 80d8182810..9318949550 100755 --- a/validate.php +++ b/validate.php @@ -296,15 +296,17 @@ if (isset($config['rrdtool_version']) && (version_compare($config['rrdtool_versi } if (check_git_exists() === true) { - if ($config['update_channel'] == 'master' && $versions['local_sha'] != $versions['github']['sha']) { - $commit_date = new DateTime('@'.$versions['local_date'], new DateTimeZone(date_default_timezone_get())); - if ($commit_date->diff(new DateTime())->days > 0) { - print_warn("Your install is over 24 hours out of date, last update: " . $commit_date->format('r')); + if ($config['update_channel'] == 'master') { + if ($versions['local_sha'] != $versions['github']['sha']) { + $commit_date = new DateTime('@' . $versions['local_date'], new DateTimeZone(date_default_timezone_get())); + if ($commit_date->diff(new DateTime())->days > 0) { + print_warn("Your install is over 24 hours out of date, last update: " . $commit_date->format('r')); + } } - } - if ($versions['local_branch'] != 'master') { - print_warn("Your local git branch is not master, this will prevent automatic updates."); + if ($versions['local_branch'] != 'master') { + print_warn("Your local git branch is not master, this will prevent automatic updates."); + } } // check for modified files