summaryrefslogtreecommitdiff
path: root/classes/rpc.php
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2021-02-26 21:48:20 +0300
committerAndrew Dolgov <[email protected]>2021-02-26 21:48:20 +0300
commit126b1fd2de5796c7e11fe5496a4a5a850363b7f1 (patch)
tree89a9a820f86d095bf50d9d9a3a2fdd94a80c8291 /classes/rpc.php
parentc521e26a1961371fcacde467d79bd3ee4162c2b2 (diff)
don't try to compare null value against anything
Diffstat (limited to 'classes/rpc.php')
-rwxr-xr-xclasses/rpc.php8
1 files changed, 4 insertions, 4 deletions
diff --git a/classes/rpc.php b/classes/rpc.php
index 016a3bd03..ce580c8ca 100755
--- a/classes/rpc.php
+++ b/classes/rpc.php
@@ -248,27 +248,27 @@ class RPC extends Handler_Protected {
if (Config::get(Config::DB_TYPE) == "pgsql") {
$update_limit_qpart = "AND ((
update_interval = 0
- AND p.value != '-1'
+ AND (p.value IS NULL OR p.value != '-1')
AND last_updated < NOW() - CAST((COALESCE(p.value, '$default_interval') || ' minutes') AS INTERVAL)
) OR (
update_interval > 0
AND last_updated < NOW() - CAST((update_interval || ' minutes') AS INTERVAL)
) OR (
update_interval >= 0
- AND p.value != '-1'
+ AND (p.value IS NULL OR p.value != '-1')
AND (last_updated = '1970-01-01 00:00:00' OR last_updated IS NULL)
))";
} else {
$update_limit_qpart = "AND ((
update_interval = 0
- AND p.value != '-1'
+ AND (p.value IS NULL OR p.value != '-1')
AND last_updated < DATE_SUB(NOW(), INTERVAL CONVERT(COALESCE(p.value, '$default_interval'), SIGNED INTEGER) MINUTE)
) OR (
update_interval > 0
AND last_updated < DATE_SUB(NOW(), INTERVAL update_interval MINUTE)
) OR (
update_interval >= 0
- AND p.value != '-1'
+ AND (p.value IS NULL OR p.value != '-1')
AND (last_updated = '1970-01-01 00:00:00' OR last_updated IS NULL)
))";
}