From c8bde450a1118e9aa96a8553e99b2fb0950c3714 Mon Sep 17 00:00:00 2001 From: John Okely Date: Mon, 27 Jul 2015 13:51:01 +0800 Subject: [PATCH] MDL-50307 auth_db: Fix associative fetching in ADODB 2.19 --- lib/adodb/adodb.inc.php | 3 +-- lib/adodb/readme_moodle.txt | 4 ++++ 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/lib/adodb/adodb.inc.php b/lib/adodb/adodb.inc.php index c6f08bc621e..a561772fe75 100644 --- a/lib/adodb/adodb.inc.php +++ b/lib/adodb/adodb.inc.php @@ -3502,8 +3502,7 @@ http://www.stanford.edu/dept/itss/docs/oracle/10g/server.101/b10759/statements_1 $key = $o->name; break; } - $val = $this->fetchMode == ADODB_FETCH_ASSOC ? $o->name : $i; - $this->bind[$key] = $val; + $this->bind[$key] = $i; } } diff --git a/lib/adodb/readme_moodle.txt b/lib/adodb/readme_moodle.txt index 5df1f81c1db..ead9b79f377 100644 --- a/lib/adodb/readme_moodle.txt +++ b/lib/adodb/readme_moodle.txt @@ -22,5 +22,9 @@ Added: Our changes: * Removed random seed initialization from lib/adodb/adodb.inc.php:177 (see 038f546 and MDL-41198). + * Added commit to fix associative fetch mode https://github.com/ADOdb/ADOdb/commit/97c3afacb3e4f98195908101bf3621e5cc847635 + When upgrading ADODB to 5.20 or higher, check + whether that commit was included and if not + remove this item skodak, iarenaza, moodler, stronk7