]> git.wh0rd.org - tt-rss.git/blobdiff - include/functions.php
force-cast some variables used in queries to integer
[tt-rss.git] / include / functions.php
index 02d0416f8e863fe462cf76f42854eec11aa785cc..a9786e49b2a08c70cf143c923efa00d98457f396 100644 (file)
        }
 
        function bool_to_sql_bool($s) {
-               return (bool)$s; //no-op for PDO
+               return $s ? 1 : 0;
        }
 
        // Session caching removed due to causing wrong redirects to upgrade
                        }
 
                        if ($entry->nodeName == 'img') {
+                               $entry->setAttribute('referrerpolicy', 'no-referrer');
 
                                if ($entry->hasAttribute('src')) {
                                        $is_https_url = parse_url($entry->getAttribute('src'), PHP_URL_SCHEME) === 'https';
                                        if ($rule["cat_id"] > 0) {
                                                $children = Feeds::getChildCategories($rule["cat_id"], $owner_uid);
                                                array_push($children, $rule["cat_id"]);
+                                               $children = array_map("intval", $children);
 
                                                $children = join(",", $children);