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

Uploadlib.php - PHP Notice - Undefined variable: notice in /lib/uploadlib.php on line 570

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Trivial
    • Resolution: Won't Fix
    • Affects Version/s: 1.9.7
    • Fix Version/s: STABLE backlog
    • Component/s: Libraries
    • Labels:
      None
    • Difficulty:
      Easy
    • Affected Branches:
      MOODLE_19_STABLE

      Description

      While running a test of Clam AV with an eicar file I came across the following PHP notice:

      Undefined variable: notice in /home/arborrow/workspace/19stable/lib/uploadlib.php on line 570

      It looks like it wants $notice to be initialized so I added an initialization of the variable at the beginning of the function which seems to resolve the issue.

        Gliffy Diagrams

          Attachments

            Activity

            Hide
            aborrow Anthony Borrow added a comment -

            here is a screen shot of the notice

            Show
            aborrow Anthony Borrow added a comment - here is a screen shot of the notice
            Hide
            aborrow Anthony Borrow added a comment -

            If the patch looks good, feel free to assign back to me and I'll happily commit the patch to 1.9 and HEAD. Peace - Anthony

            Show
            aborrow Anthony Borrow added a comment - If the patch looks good, feel free to assign back to me and I'll happily commit the patch to 1.9 and HEAD. Peace - Anthony
            Hide
            iarenaza Iñaki Arenaza added a comment -

            Looks good to me, Anthony

            Saludos,
            Iñaki.

            Show
            iarenaza Iñaki Arenaza added a comment - Looks good to me, Anthony Saludos, Iñaki.
            Hide
            aborrow Anthony Borrow added a comment -

            Thanks Iñaki - I will wait for Moodle.com to either commit the patch or assign the issue to me. Peace - Anthony

            Show
            aborrow Anthony Borrow added a comment - Thanks Iñaki - I will wait for Moodle.com to either commit the patch or assign the issue to me. Peace - Anthony
            Hide
            danielneis Daniel Neis Araujo added a comment -

            Hello, Anthony and Iñaki

            i have applied the patch here and it works well.

            =)

            Show
            danielneis Daniel Neis Araujo added a comment - Hello, Anthony and Iñaki i have applied the patch here and it works well. =)
            Hide
            salvetore Michael de Raadt added a comment -

            Thanks for reporting this issue.

            We have detected that this issue has been inactive for over a year has been recorded as affecting versions that are no longer supported.

            If you believe that this issue is still relevant to current versions (2.3 and beyond), please comment on the issue. Issues left inactive for a further month will be closed.

            Michael d;

            4d6f6f646c6521

            Show
            salvetore Michael de Raadt added a comment - Thanks for reporting this issue. We have detected that this issue has been inactive for over a year has been recorded as affecting versions that are no longer supported. If you believe that this issue is still relevant to current versions (2.3 and beyond), please comment on the issue. Issues left inactive for a further month will be closed. Michael d; 4d6f6f646c6521
            Hide
            aborrow Anthony Borrow added a comment -

            This seems to be handled better in 2.3 with the file picker so I am not seeing the notice. I think this can be closed as either fixed in 2.x or Won't fix. Peace - Anthony

            Show
            aborrow Anthony Borrow added a comment - This seems to be handled better in 2.3 with the file picker so I am not seeing the notice. I think this can be closed as either fixed in 2.x or Won't fix. Peace - Anthony
            Hide
            danmarsden Dan Marsden added a comment -

            closing as won't fix - thanks Anthony.

            Show
            danmarsden Dan Marsden added a comment - closing as won't fix - thanks Anthony.

              People

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

                Dates

                • Created:
                  Updated:
                  Resolved: