]> git.wh0rd.org - tt-rss.git/commitdiff
bool_to_sql_bool: for some reason PDO really likes integers for boolean columns
authorAndrew Dolgov <noreply@fakecake.org>
Tue, 5 Dec 2017 21:12:28 +0000 (00:12 +0300)
committerAndrew Dolgov <noreply@fakecake.org>
Tue, 5 Dec 2017 21:12:28 +0000 (00:12 +0300)
incidentally this fixes OPML filter import

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