]> git.wh0rd.org - tt-rss.git/blobdiff - include/functions.php
bool_to_sql_bool: for some reason PDO really likes integers for boolean columns
[tt-rss.git] / include / functions.php
index 02d0416f8e863fe462cf76f42854eec11aa785cc..e1e63c2a36f097584fbaf95b8c876a069b7ea36e 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