summaryrefslogtreecommitdiff
path: root/drivers/adodb-sqlite3.inc.php
diff options
context:
space:
mode:
authorMark Newnham <mark@newnhams.com>2025-08-12 21:02:17 -0600
committerDamien Regad <dregad@mantisbt.org>2025-08-18 18:27:03 +0200
commit85f4495d69a0b520c1c95a5bfc4dcc458e0c85dc (patch)
treedb17c0444fd7f94b3c07fbd66b096740326bc3af /drivers/adodb-sqlite3.inc.php
parent26f845a52a0c9755e3174712bba89036078e8c4c (diff)
downloadadodb-85f4495d69a0b520c1c95a5bfc4dcc458e0c85dc.tar.gz
adodb-85f4495d69a0b520c1c95a5bfc4dcc458e0c85dc.tar.bz2
adodb-85f4495d69a0b520c1c95a5bfc4dcc458e0c85dc.zip
Changes the returned keys to lowercase if necessary
Fixes #1090 Signed-off-by: Damien Regad <dregad@mantisbt.org> The original commit was modified to remove the change of indentation from tab to space.
Diffstat (limited to 'drivers/adodb-sqlite3.inc.php')
-rw-r--r--drivers/adodb-sqlite3.inc.php13
1 files changed, 13 insertions, 0 deletions
diff --git a/drivers/adodb-sqlite3.inc.php b/drivers/adodb-sqlite3.inc.php
index 6d25762e..96b47d14 100644
--- a/drivers/adodb-sqlite3.inc.php
+++ b/drivers/adodb-sqlite3.inc.php
@@ -195,6 +195,8 @@ class ADODB_sqlite3 extends ADOConnection {
$arr = array();
while ($r = $rs->FetchRow()) {
+ $r = array_change_key_case($r, CASE_LOWER);
+
$type = explode('(', $r['type']);
$size = '';
if (sizeof($type) == 2) {
@@ -754,9 +756,20 @@ class ADORecordset_sqlite3 extends ADORecordSet {
return false;
}
+ /**
+ * Uses the SQLite3 fetchArray method to retrieve the next row.
+ *
+ * @param bool $ignore_fields discarded for SQLite3.
+ *
+ * @return bool
+ */
function _fetch($ignore_fields=false)
{
$this->fields = $this->_queryID->fetchArray($this->fetchMode);
+ if (!empty($this->fields) && ADODB_ASSOC_CASE != ADODB_ASSOC_CASE_NATIVE) {
+ $this->fields = array_change_key_case($this->fields, ADODB_ASSOC_CASE);
+ }
+
return !empty($this->fields);
}