fix validate wrong comparison (#6242)

This commit is contained in:
Tony Murray
2017-03-22 17:13:40 -05:00
committed by Neil Lathwood
parent d8d0bb3d5b
commit a2115458af

View File

@@ -269,7 +269,7 @@ if (!function_exists('openssl_random_pseudo_bytes')) {
// check poller
if (dbFetchCell('SELECT COUNT(*) FROM `pollers`')) {
if (dbFetchCell('SELECT COUNT(*) FROM `pollers` WHERE `last_polled` < DATE_ADD(NOW(), INTERVAL - 5 MINUTE)') == 0) {
if (dbFetchCell('SELECT COUNT(*) FROM `pollers` WHERE `last_polled` >= DATE_ADD(NOW(), INTERVAL - 5 MINUTE)') == 0) {
print_fail("The poller has not run in the last 5 minutes, check the cron job");
}
} else {