From 01788faeb50cca9a18ddd5b132dd41c9494d6355 Mon Sep 17 00:00:00 2001 From: nikrou Date: Mon, 24 May 2010 20:44:55 +0000 Subject: Fix bug 1695 : incorrect boolean to string conversion for SQLite and PostgreSQL database engines merge from trunk git-svn-id: http://piwigo.org/svn/branches/2.1@6342 68402e56-0260-453c-a942-63ccdbb3a9ee --- include/dblayer/functions_sqlite.inc.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'include/dblayer/functions_sqlite.inc.php') diff --git a/include/dblayer/functions_sqlite.inc.php b/include/dblayer/functions_sqlite.inc.php index 1b34d3fcb..9de81868d 100644 --- a/include/dblayer/functions_sqlite.inc.php +++ b/include/dblayer/functions_sqlite.inc.php @@ -479,13 +479,13 @@ function get_boolean( $string ) */ function boolean_to_string($var) { - if (!empty($var) && ($var == 'true')) + if (is_bool($var)) { - return 'true'; + return $var ? 'true' : 'false'; } else { - return 'false'; + return $var; } } -- cgit v1.2.3