Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-15798

new dml (moodle_recordset particularly) break backwards compatiblity with keys

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 2.0
    • Fix Version/s: 2.0
    • Component/s: Database SQL/XMLDB
    • Labels:
      None
    • Affected Branches:
      MOODLE_20_STABLE
    • Fixed Branches:
      MOODLE_20_STABLE

      Description

      In order to fully support backwards compatibility with the new moodle_recordset objects, we must change the implementation of key (as mandated by the Iterator interface) to return the first column of the current row. Currently it is returning the rowcount.

      This means that

      $records = $DB->get_records('foo'); and $records[$someid] do not behave as they used to.

        Attachments

          Activity

            People

            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Fix Release Date:
                24/Nov/10