Moodle
  1. Moodle
  2. MDL-16939

weblib.php: build_navigation notice when new type parameter not provided

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 1.9, 2.0
    • Fix Version/s: 1.9.4
    • Component/s: Libraries
    • Labels:
      None
    • Affected Branches:
      MOODLE_19_STABLE, MOODLE_20_STABLE
    • Fixed Branches:
      MOODLE_19_STABLE
    • Rank:
      30322

      Description

      The type variable is not checked for or initialized allowing for a PHP warning in my case:

      Notice: Undefined index: type in /home/arborrow/Moodle/code/contrib-605/lib/weblib.php on line 3815

      I think if we test for it first that would help especially considering that the usage of type is admittedly not very well documented yet and at this point only used to check for activity.

      Peace - Anthony

      1. MDL-16939.diff
        0.7 kB
        Anthony Borrow

        Activity

        Hide
        Anthony Borrow added a comment -

        here is a quick patch that seemed to resolve the issue

        Show
        Anthony Borrow added a comment - here is a quick patch that seemed to resolve the issue
        Hide
        Eloy Lafuente (stronk7) added a comment -

        +1 for that! Anthony, do you use to apply this sort of things or should I assign to someone else?

        Thanks, anyway. Ciao

        Show
        Eloy Lafuente (stronk7) added a comment - +1 for that! Anthony, do you use to apply this sort of things or should I assign to someone else? Thanks, anyway. Ciao
        Hide
        Anthony Borrow added a comment -

        Eloy - I'm happy to apply it, I just like to have someone with more experience give the patch a look before I commit anything to CORE. I'll go ahead and check it in. Peace - Anthony

        Show
        Anthony Borrow added a comment - Eloy - I'm happy to apply it, I just like to have someone with more experience give the patch a look before I commit anything to CORE. I'll go ahead and check it in. Peace - Anthony
        Hide
        Eloy Lafuente (stronk7) added a comment -

        Thanks Anthony! Resolving as fixed. Ciao

        Show
        Eloy Lafuente (stronk7) added a comment - Thanks Anthony! Resolving as fixed. Ciao
        Hide
        Eloy Lafuente (stronk7) added a comment -

        Checked. Closing.

        Show
        Eloy Lafuente (stronk7) added a comment - Checked. Closing.

          People

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

            Dates

            • Created:
              Updated:
              Resolved: