Moodle
  1. Moodle
  2. MDL-21202

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

    Details

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

      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.

      1. clam_notice.patch
        0.6 kB
        Anthony Borrow
      1. eicar_notice.png
        178 kB
      2. eicar_scan.png
        96 kB

        Activity

        Hide
        Anthony Borrow added a comment -

        here is a screen shot of the notice

        Show
        Anthony Borrow added a comment - here is a screen shot of the notice
        Hide
        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
        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
        Iñaki Arenaza added a comment -

        Looks good to me, Anthony

        Saludos,
        Iñaki.

        Show
        Iñaki Arenaza added a comment - Looks good to me, Anthony Saludos, Iñaki.
        Hide
        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
        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
        Daniel Neis added a comment -

        Hello, Anthony and Iñaki

        i have applied the patch here and it works well.

        =)

        Show
        Daniel Neis added a comment - Hello, Anthony and Iñaki i have applied the patch here and it works well. =)
        Hide
        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
        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
        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
        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
        Dan Marsden added a comment -

        closing as won't fix - thanks Anthony.

        Show
        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: