aboutsummaryrefslogtreecommitdiffstats
path: root/include/dblayer/functions_pdo-sqlite.inc.php
diff options
context:
space:
mode:
authornikrou <nikrou@piwigo.org>2010-05-24 20:12:35 +0000
committernikrou <nikrou@piwigo.org>2010-05-24 20:12:35 +0000
commitee35b8a0808da6e3edd86c1f82a40eaaefaf6b85 (patch)
treea638b5151f986e09b315c1649513fdd946af4d0b /include/dblayer/functions_pdo-sqlite.inc.php
parent555364c8a934a729ee2361c41033b836c63aef3e (diff)
Fix bug 1695 : incorrect boolean to string conversion for SQLite and PostgreSQL database engines
git-svn-id: http://piwigo.org/svn/trunk@6339 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to 'include/dblayer/functions_pdo-sqlite.inc.php')
-rw-r--r--include/dblayer/functions_pdo-sqlite.inc.php6
1 files changed, 3 insertions, 3 deletions
diff --git a/include/dblayer/functions_pdo-sqlite.inc.php b/include/dblayer/functions_pdo-sqlite.inc.php
index a4c3881f0..a1f0a7833 100644
--- a/include/dblayer/functions_pdo-sqlite.inc.php
+++ b/include/dblayer/functions_pdo-sqlite.inc.php
@@ -467,13 +467,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;
}
}