Moodle
  1. Moodle
  2. MDL-30409

'throw coding_exception' (missing new) in moodlelib

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Trivial 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
    • Rank:
      33036

      Description

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

        Activity

        Hide
        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
        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
        Eloy Lafuente (stronk7) added a comment -

        bringing this in...

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

        Integrated, thanks!

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

        sweet, this works for me!

        Show
        Aparup Banerjee added a comment - sweet, this works for me!
        Hide
        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
        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: