From df5f91657093a46a1bbd2252467c0d987d84d8b7 Mon Sep 17 00:00:00 2001 From: stronk7 Date: Tue, 15 Sep 2009 22:14:54 +0000 Subject: [PATCH] Fix incorrect var name and unnecessary (object) cast --- lib/dml/mssql_native_moodle_database.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/dml/mssql_native_moodle_database.php b/lib/dml/mssql_native_moodle_database.php index e3574bfc05..df26884695 100644 --- a/lib/dml/mssql_native_moodle_database.php +++ b/lib/dml/mssql_native_moodle_database.php @@ -735,12 +735,12 @@ class mssql_native_moodle_database extends moodle_database { $results = array(); foreach ($rs as $row) { - $id = reset($row); - if (isset($return[$id])) { + $id = reset($row); + if (isset($results[$id])) { $colname = key($row); debugging("Did you remember to make the first column something unique in your call to get_records? Duplicate value '$id' found in column '$colname'.", DEBUG_DEVELOPER); } - $results[$id] = (object)$row; + $results[$id] = $row; } $rs->close(); -- 2.39.5