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

groups_delete_group_members opens but does not close a recordset

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Minor
    • 2.9.4, 3.0.2
    • 2.9
    • Groups
    • 3.1 Stable Sprint 2

    Description

      group/lib.php

      I used this function as an interview question to review some bad code.

      The bug in this code is not closing the recordset - but there are some other things that are not good here:

      • (repeated) DB queries in a loop
      • no error checking
      • mixes display logic and business logic
      • does not clear group caches
      • it makes baby kittens sad

      Attachments

        Activity

          People

            markn Mark Nelson
            damyon Damyon Wiese
            cameron1729 cameron1729
            Dan Poltawski Dan Poltawski
            CiBoT CiBoT
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Clockify

                Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.