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 Sub-task
    • Status: Closed
    • Priority: Minor 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
    • Rank:
      33633

      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

        Activity

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

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

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

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

        Show
        Anthony Borrow added a comment - Re-assigning to Penny since she committed the code, feel free to re-assign as desired. Peace - Anthony
        Anthony Borrow made changes -
        Assignee David Mudrak [ mudrd8mz ] Penny Leach [ mjollnir ]
        David Mudrak made changes -
        Assignee Penny Leach [ mjollnir ] David Mudrak [ mudrd8mz ]
        Hide
        David Mudrak 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
        David Mudrak 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?
        David Mudrak made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Fix Version/s 2.0 [ 10122 ]
        Resolution Fixed [ 1 ]
        Hide
        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
        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
        Anthony Borrow added a comment -

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

        Show
        Anthony Borrow added a comment - Tested committed fix and it resolved the issue. Peace - Anthony
        Anthony Borrow made changes -
        Status Resolved [ 5 ] Closed [ 6 ]
        QA Assignee aborrow
        Martin Dougiamas made changes -
        Workflow jira [ 37879 ] MDL Workflow [ 65140 ]
        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: