Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-21255 Mnet overhaul for Moodle 2.0
  3. MDL-23600

Warning: Invalid argument supplied for foreach() in /home1/jesuits1/public_html/moodle/mnet/lib.php on line 638

    Details

    • Type: Sub-task
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 2.0
    • Fix Version/s: 2.0
    • Component/s: MNet
    • Labels:
      None
    • Affected Branches:
      MOODLE_20_STABLE
    • Fixed Branches:
      MOODLE_20_STABLE

      Description

      Penny,

      I received the following error on one of my sites that I was experimenting updating to 2.0. The errors seems to be caused because we are assuming that a userid of 1 will exist. I am not a fan of having a hard coded id listed in the code. Might it be better to use something like $USER->id instead? Although looking at the code, I'm not sure it is worth adding in the global $USER to the function. Perhaps there might be a better way of grabbing a user such as deleted=0.

      Peace - Anthony

        Gliffy Diagrams

          Attachments

            Activity

            aborrow Anthony Borrow created issue -
            Hide
            aborrow Anthony Borrow added a comment -

            Here's a screen shot from my site which did not have a user id of 1

            Show
            aborrow Anthony Borrow added a comment - Here's a screen shot from my site which did not have a user id of 1
            aborrow Anthony Borrow made changes -
            Field Original Value New Value
            Attachment mnet_error.png [ 20984 ]
            Hide
            aborrow Anthony Borrow added a comment -

            Re-assigning to Penny since she committed the code, feel free to re-assign as desired. Peace - Anthony

            Show
            aborrow Anthony Borrow added a comment - Re-assigning to Penny since she committed the code, feel free to re-assign as desired. Peace - Anthony
            aborrow Anthony Borrow made changes -
            Assignee David Mudrak [ mudrd8mz ] Penny Leach [ mjollnir ]
            mudrd8mz David Mudrák made changes -
            Assignee Penny Leach [ mjollnir ] David Mudrak [ mudrd8mz ]
            Hide
            mudrd8mz David Mudrák added a comment -

            Thanks for reporting this Anthony. I just committed a fix for this so it just requires that there is at least some record in the user table. Can you please re-test the situation?

            Show
            mudrd8mz David Mudrák added a comment - Thanks for reporting this Anthony. I just committed a fix for this so it just requires that there is at least some record in the user table. Can you please re-test the situation?
            mudrd8mz David Mudrák made changes -
            Status Open [ 1 ] Resolved [ 5 ]
            Fix Version/s 2.0 [ 10122 ]
            Resolution Fixed [ 1 ]
            Hide
            aborrow Anthony Borrow added a comment -

            David - I saw the commit and it looks good. I tested it on the site that was causing the problem and it looks good. I will go ahead and close. Peace - Anthony

            Show
            aborrow Anthony Borrow added a comment - David - I saw the commit and it looks good. I tested it on the site that was causing the problem and it looks good. I will go ahead and close. Peace - Anthony
            Hide
            aborrow Anthony Borrow added a comment -

            Tested committed fix and it resolved the issue. Peace - Anthony

            Show
            aborrow Anthony Borrow added a comment - Tested committed fix and it resolved the issue. Peace - Anthony
            aborrow Anthony Borrow made changes -
            Status Resolved [ 5 ] Closed [ 6 ]
            QA Assignee aborrow
            dougiamas Martin Dougiamas made changes -
            Workflow jira [ 37879 ] MDL Workflow [ 65140 ]
            dougiamas Martin Dougiamas made changes -
            Workflow MDL Workflow [ 65140 ] MDL Full Workflow [ 94459 ]

              People

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

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Fix Release Date:
                  24/Nov/10