Browse Source

bool_to_sql_bool: for some reason PDO really likes integers for boolean columns

incidentally this fixes OPML filter import
Andrew Dolgov 6 năm trước cách đây
mục cha
commit
76fc7a2d9c
1 tập tin đã thay đổi với 1 bổ sung1 xóa
  1. 1 1
      include/functions.php

+ 1 - 1
include/functions.php

@@ -956,7 +956,7 @@
 	}
 
 	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