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

Trying to insert into a non-existent table produces coding_exception, should be dml exception

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 2.5.1
    • Fix Version/s: 2.7
    • Component/s: Database SQL/XMLDB
    • Labels:

      Description

      In the moodle database classes;

      • insert_record
      • calls get_columns
      • which returns array()

      insert_record then uses that empty array to contruct a insert_record_raw, which correctly complains there are no columns. There is a coding issue. It's with insert_record, which should throw DML exception when no colums are returned.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              mr-russ Russell Smith
              Reporter:
              mr-russ Russell Smith
              Peer reviewer:
              Eloy Lafuente (stronk7)
              Integrator:
              Sam Hemelryk
              Tester:
              Andrew Nicols
              Participants:
              Component watchers:
              Andrew Nicols, Jun Pataleta, Michael Hawkins, Shamim Rezaie, Simey Lameze
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Fix Release Date:
                12/May/14