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

perform safety check on the third argument to upgrade_main_savepoint()

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 2.0.4, 2.1.1, 2.2
    • Fix Version/s: 2.0.5, 2.1.2
    • Component/s: Administration
    • Labels:

      Description

      We use two upgrade functions to track versions. upgrade_main_savepoint() and upgrade_mod_savepoint(). Mixing them up causes bad things to happen as the mod version may be ahead of the moodle core version.

      The third param to upgrade_main_savepoint() is a boolean. The third param to upgrade_mod_savepoint() is a string (component name).

      We could add a check to upgrade_main_savepoint() that tests if the 3rd param is a boolean. If not its likely someone is calling the wrong function and we should display an error.

        Gliffy Diagrams

          Attachments

            Activity

              People

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

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Fix Release Date:
                  10/Oct/11