summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNathan Gass2023-08-16 17:43:59 +0200
committerNathan Gass2023-08-16 17:43:59 +0200
commit56da1be11e400538bc360bece8a0e5a533fff91a (patch)
tree932492263341cee95baf688b42181dac5030bdc5
parent3abdd4daeddd6da684d2731f9780b4aa38b3c280 (diff)
downloaditools-56da1be11e400538bc360bece8a0e5a533fff91a.tar.gz
itools-56da1be11e400538bc360bece8a0e5a533fff91a.tar.bz2
itools-56da1be11e400538bc360bece8a0e5a533fff91a.zip
fix failing it_dbi tests when using postgresql
-rw-r--r--it_dbi.class2
-rw-r--r--it_dbi_postgres.class2
2 files changed, 2 insertions, 2 deletions
diff --git a/it_dbi.class b/it_dbi.class
index d864a1a..41054c7 100644
--- a/it_dbi.class
+++ b/it_dbi.class
@@ -932,7 +932,7 @@ function escape_name($str)
*/
static function escape_bool($bool)
{
- return $bool ? 'TRUE' : 'FALSE';
+ return intval($bool) ? 'TRUE' : 'FALSE';
}
/**
diff --git a/it_dbi_postgres.class b/it_dbi_postgres.class
index 82d57d2..e96a46d 100644
--- a/it_dbi_postgres.class
+++ b/it_dbi_postgres.class
@@ -56,7 +56,7 @@ function _tables($p = array())
static function _convertbool($v)
{
- return $v == 't' ? true : false;
+ return $v == 't' ? 1 : 0;
}
function _get_field_defs()