aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes/db/sqlite.php
diff options
context:
space:
mode:
Diffstat (limited to 'phpBB/includes/db/sqlite.php')
-rw-r--r--phpBB/includes/db/sqlite.php19
1 files changed, 18 insertions, 1 deletions
diff --git a/phpBB/includes/db/sqlite.php b/phpBB/includes/db/sqlite.php
index 8bea1a3198..c203af9f67 100644
--- a/phpBB/includes/db/sqlite.php
+++ b/phpBB/includes/db/sqlite.php
@@ -216,7 +216,16 @@ class dbal_sqlite extends dbal
return $cache->sql_fetchrow($query_id);
}
- return ($query_id) ? @sqlite_fetch_array($query_id, SQLITE_ASSOC) : false;
+ $row = @sqlite_fetch_array($query_id, SQLITE_ASSOC);
+ if ($row)
+ {
+ foreach ($row as $key => $value)
+ {
+ $row[$key] = (strpos($key, 'bitfield') === false) ? $value : sqlite_udf_decode_binary($value);
+ }
+ }
+
+ return $row;
}
/**
@@ -308,6 +317,14 @@ class dbal_sqlite extends dbal
}
/**
+ * Escape string used in sql query
+ */
+ function sql_escape_binary($msg)
+ {
+ return "'" . @sqlite_udf_encode_binary($msg) . "'";
+ }
+
+ /**
* return sql error array
* @access: private
*/