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

PHP warning when searching the database activity with no fields

    XMLWordPrintable

    Details

    • Testing Instructions:
      Hide
      Test 1
      1. Enable debugging on your site.
      2. Create a database activity in a course and add nothing to it.
      3. Log in as a student for the course and view the database activity.
      4. Click on the search tab and ensure there is no PHP notice.
      Test 2
      1. Create a database activity.
      2. Add some fields.
      3. Add some entries.
      4. Save a single template.
      5. Click on 'View single'.
      6. Ensure there are no errors.
      Show
      Test 1 Enable debugging on your site. Create a database activity in a course and add nothing to it. Log in as a student for the course and view the database activity. Click on the search tab and ensure there is no PHP notice. Test 2 Create a database activity. Add some fields. Add some entries. Save a single template. Click on 'View single'. Ensure there are no errors.
    • Affected Branches:
      MOODLE_30_STABLE
    • Fixed Branches:
      MOODLE_30_STABLE
    • Pull from Repository:
    • Pull Master Branch:
      MDL-54125_master

      Description

      The following warning is displayed in the database activity to students in the search tab when there are no fields - "Warning: Invalid argument supplied for foreach() in /home/markn/mstorage/sm/moodle/mod/data/lib.php on line 1722"

        Attachments

          Activity

            People

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

              Dates

              • Created:
                Updated:
                Resolved:
                Fix Release Date:
                11/Jul/16