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

get_record call in get_timezone_record has third param as bool, whereas it should be int

    Details

    • Testing Instructions:
      Hide

      0/ enable debug developer
      1/ set up timezone on your server
      2/ load timezones if needed (admin->location->update timezones)
      3/ make sure it does not throw any exceptions or notices
      4/ edit your profile and change the timezone to some known timezone near you
      5/ after saving the profile, the "Last access" in profile page shows the correct time for the timezone selected, and no warnings/notices are shown.

      Show
      0/ enable debug developer 1/ set up timezone on your server 2/ load timezones if needed (admin->location->update timezones) 3/ make sure it does not throw any exceptions or notices 4/ edit your profile and change the timezone to some known timezone near you 5/ after saving the profile, the "Last access" in profile page shows the correct time for the timezone selected, and no warnings/notices are shown.
    • Affected Branches:
      MOODLE_21_STABLE, MOODLE_22_STABLE
    • Fixed Branches:
      MOODLE_21_STABLE, MOODLE_22_STABLE
    • Pull from Repository:
    • Pull Master Branch:
      w04_MDL-31208_m23_timezone

      Description

      In lib/moodlelib.php, third argument to the get_record call in get_timezone_record($timezonename) is incorrect.
      Currently it is true and should be IGNORE_MULTIPLE.

        Gliffy Diagrams

          Issue Links

            Activity

            Hide
            skodak Petr Skoda added a comment -

            Thanks a lot for the report and proposed fix.

            Show
            skodak Petr Skoda added a comment - Thanks a lot for the report and proposed fix.
            Hide
            stronk7 Eloy Lafuente (stronk7) added a comment -

            Integrated (21, 22 and master)

            Show
            stronk7 Eloy Lafuente (stronk7) added a comment - Integrated (21, 22 and master)
            Hide
            gerry Gerard Caulfield added a comment -

            Step 3 and 5 did not throw any errors for me before the patch. Resigning as tester.

            Show
            gerry Gerard Caulfield added a comment - Step 3 and 5 did not throw any errors for me before the patch. Resigning as tester.
            Hide
            abgreeve Adrian Greeve added a comment -

            I also tried the testing instructions pre patch and didn't notice any exceptions or notices in step 3 or 5. I'm guessing that it didn't throw any.
            Post patch and no exceptions or notices were generated. The time display was correct.
            Test passed.

            Show
            abgreeve Adrian Greeve added a comment - I also tried the testing instructions pre patch and didn't notice any exceptions or notices in step 3 or 5. I'm guessing that it didn't throw any. Post patch and no exceptions or notices were generated. The time display was correct. Test passed.
            Hide
            stronk7 Eloy Lafuente (stronk7) added a comment -

            Yup, it was working because (true == IGNORE_MULTIPLE == 1) evaluates true. So in fact it was working ok (but with an incorrect true passed instead of correct IGNORE_MULTIPLE). We were lucky assigning 1 to that constant, lol.

            Ciao

            Show
            stronk7 Eloy Lafuente (stronk7) added a comment - Yup, it was working because (true == IGNORE_MULTIPLE == 1) evaluates true. So in fact it was working ok (but with an incorrect true passed instead of correct IGNORE_MULTIPLE). We were lucky assigning 1 to that constant, lol. Ciao
            Hide
            stronk7 Eloy Lafuente (stronk7) added a comment -

            Your nice code represents only 1/46 of the issues that have been sent upstream this week, so thanks, but not many.

            Nah, joking, many thanks! Closing this a fixed, ciao

            Show
            stronk7 Eloy Lafuente (stronk7) added a comment - Your nice code represents only 1/46 of the issues that have been sent upstream this week, so thanks, but not many. Nah, joking, many thanks! Closing this a fixed, ciao

              People

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

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Fix Release Date:
                  12/Mar/12