]> git.wh0rd.org - tt-rss.git/blobdiff - include/functions.php
get_feed_access_key: param type bullshit
[tt-rss.git] / include / functions.php
index f1b016de7ecf67e9c9f6353eb91680d63ab78006..7bf5460dbfb025813dcddfce896b463b94e1a6fa 100644 (file)
@@ -57,7 +57,7 @@
        // do not cache files smaller than that (bytes)
        define_default('CACHE_MAX_DAYS', 7);
        // max age in days for various automatically cached (temporary) files
-    define_default('MAX_CONDITIONAL_INTERVAL', 3600*6);
+    define_default('MAX_CONDITIONAL_INTERVAL', 3600*12);
     // max interval between forced unconditional updates for servers
     // not complying with http if-modified-since (seconds)
 
                $sth = $pdo->prepare("SELECT access_key FROM ttrss_access_keys
                                WHERE feed_id = ? AND is_cat = ?
                                AND owner_uid = ?");
-               $sth->execute([$feed_id, $is_cat, $owner_uid]);
+               $sth->execute([$feed_id, (int)$is_cat, $owner_uid]);
 
                if ($row = $sth->fetch()) {
                        return $row["access_key"];
                                        (access_key, feed_id, is_cat, owner_uid)
                                        VALUES (?, ?, ?, ?)");
 
-                       $sth->execute([$key, $feed_id, $is_cat, $owner_uid]);
+                       $sth->execute([$key, $feed_id, (int)$is_cat, $owner_uid]);
 
                        return $key;
                }