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

Block instance_delete is not called

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Minor Minor
    • 1.8
    • 1.8
    • Blocks
    • None
    • MOODLE_18_STABLE
    • MOODLE_18_STABLE

      The block class has an instance_delete method, but this is not called when an instance is deleted. There is an obvious code bug in blocklib:

      if(!$record = blocks_get_record($instance->blockid)) {
      if(!$obj = block_instance($record->name, $instance)) {
      // Return value ignored
      $obj->instance_delete();

      The two if statements should be if(), not if. I have fixed this on HEAD.

            quen Sam Marshall
            quen Sam Marshall
            Nobody Nobody (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:

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