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

'throw coding_exception' (missing new) in moodlelib

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Trivial
    • Resolution: Fixed
    • Affects Version/s: 2.2
    • Fix Version/s: 2.2
    • Component/s: Libraries
    • Labels:
    • Testing Instructions:
      Hide

      DIFFICULT

      0. Ensure debugging is set to max and to display, etc.

      1. Go into some code or other and add the following line:

      plugin_supports('a', 'b', 'c');

      2. Run the code.

      + Verify that it throws a coding_exception which should be displayed etc: 'Coding error detected, it must be fixed by a programmer: Invalid component used in plugin_supports():a_b'

      + In particular it should not display a php fatal error.

      Show
      DIFFICULT 0. Ensure debugging is set to max and to display, etc. 1. Go into some code or other and add the following line: plugin_supports('a', 'b', 'c'); 2. Run the code. + Verify that it throws a coding_exception which should be displayed etc: 'Coding error detected, it must be fixed by a programmer: Invalid component used in plugin_supports():a_b' + In particular it should not display a php fatal error.
    • Affected Branches:
      MOODLE_22_STABLE
    • Fixed Branches:
      MOODLE_22_STABLE
    • Pull Master Branch:
      MDL-30409-master

      Description

      Some places in moodlelib have invalid syntax (throw coding_exception when it needs to be throw new coding_exception)

        Gliffy Diagrams

          Attachments

            Activity

            Hide
            quen Sam Marshall added a comment -

            NOTE: Submitting this for integration but up to you if you want to include in 2.2 or not, I don't care, 2.3 would be fine

            Show
            quen Sam Marshall added a comment - NOTE: Submitting this for integration but up to you if you want to include in 2.2 or not, I don't care, 2.3 would be fine
            Hide
            stronk7 Eloy Lafuente (stronk7) added a comment -

            bringing this in...

            Show
            stronk7 Eloy Lafuente (stronk7) added a comment - bringing this in...
            Hide
            stronk7 Eloy Lafuente (stronk7) added a comment -

            Integrated, thanks!

            Show
            stronk7 Eloy Lafuente (stronk7) added a comment - Integrated, thanks!
            Hide
            nebgor Aparup Banerjee added a comment -

            sweet, this works for me!

            Show
            nebgor Aparup Banerjee added a comment - sweet, this works for me!
            Hide
            stronk7 Eloy Lafuente (stronk7) added a comment -

            And this has landed upstream, just on time for the upcoming new releases week. Thanks for it!

            Ciao

            Show
            stronk7 Eloy Lafuente (stronk7) added a comment - And this has landed upstream, just on time for the upcoming new releases week. Thanks for it! Ciao

              People

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

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Fix Release Date:
                  5/Dec/11