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

Single quote in question name or description breaks update to 1.9beta+

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Blocker
    • Resolution: Fixed
    • Affects Version/s: 1.9
    • Fix Version/s: 1.9
    • Component/s: Questions
    • Labels:
      None
    • Affected Branches:
      MOODLE_19_STABLE
    • Fixed Branches:
      MOODLE_19_STABLE

      Description

      Single quote in question name or description breaks update to 1.9beta+, throwing this type of warning:

      ADOConnection._Execute(UPDATE mdl_question_categories SET name = 'Evaluation de modules', contextid = '170', info = 'Questionnaire d'évaluation a remp..., false) % line 891, file: adodb.inc.php
      ADOConnection.Execute(UPDATE mdl_question_categories SET name = 'Evaluation de modules', contextid = '170', info = 'Questionnaire d'évaluation a remp...) % line 1627, file: dmllib.php
      update_record(question_categories, Object:stdClass) % line 276, file: upgrade.php
      question_upgrade_context_etc() % line 1680, file: upgrade.php
      xmldb_main_upgrade(2007021520) % line 329, file: index.php

        Gliffy Diagrams

          Activity

          Hide
          timhunt Tim Hunt added a comment -

          Argh! it is the wretched lack of placeholders in dmllib again - so you you read data from the DB then write it back, you have to remember to call addslashes. I'll fix it.

          Show
          timhunt Tim Hunt added a comment - Argh! it is the wretched lack of placeholders in dmllib again - so you you read data from the DB then write it back, you have to remember to call addslashes. I'll fix it.
          Hide
          timhunt Tim Hunt added a comment -

          Should be fixed now.

          Show
          timhunt Tim Hunt added a comment - Should be fixed now.
          Hide
          mina Nicolas Martignoni added a comment -

          Verified on fresh 1.9beta+ from CVS. Closing.

          Thanks for the quick fix

          Show
          mina Nicolas Martignoni added a comment - Verified on fresh 1.9beta+ from CVS. Closing. Thanks for the quick fix

            People

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

              Dates

              • Created:
                Updated:
                Resolved:
                Fix Release Date:
                3/Mar/08