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

xmldb should validate the xml syntax rather than die

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 1.7
    • Fix Version/s: 1.8, 1.9
    • Component/s: Database SQL/XMLDB
    • Labels:
      None
    • Affected Branches:
      MOODLE_17_STABLE
    • Fixed Branches:
      MOODLE_18_STABLE, MOODLE_19_STABLE

      Description

      Writing invalid xml causes xmldb to die with the following error:

      PHP Fatal error: Cannot use string offset as an array in /var/www/mahara/htdocs/lib/xmldb/classes/XMLDBTable.class.php on line 469

      This was caused by the following fragment:

      <TABLE NAME="foo" />
      <FIELDS>
      ....
      </FIELDS>
      </TABLE>

      (note closing slash on opening TABLE tag)

      can xmldb validate the xml first before continuing ?

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              stronk7 Eloy Lafuente (stronk7)
              Reporter:
              mjollnir Penny Leach
              Tester:
              Nobody
              Participants:
              Component watchers:
              Andrew Nicols, Dongsheng Cai, Huong Nguyen, Jun Pataleta, Michael Hawkins, Shamim Rezaie, Simey Lameze
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Fix Release Date:
                31/Mar/07