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

Missing return type check in block_edit_form::process_dynamic_submission

XMLWordPrintable

      The call to add_block_at_end_of_default_region can return null, but if it does, an exception is thrown (block_not_on_page_exception) when find_instance is called.

       

      This can happen if a plugin overrides add_block_at_end_of_default_region and intentionally returns null in order to prevent a user adding a block:

      https://moodle.org/plugins/tool_blocksmanager

      https://github.com/moodle/moodle/blob/main/blocks/edit_form.php#L434-L452

        1. issue_record.webm
          5.56 MB
        2. issue.png
          issue.png
          112 kB
        3. MDL-83044.png
          MDL-83044.png
          80 kB
        4. Screencast from 29-10-24.webm
          5.27 MB
        5. Screenshot from 2024-09-08 21-27-00.png
          Screenshot from 2024-09-08 21-27-00.png
          139 kB

            avdb Alexander Van der Bellen
            avdb Alexander Van der Bellen
            Dmitrii Metelkin Dmitrii Metelkin
            David Woloszyn David Woloszyn
            Ron Carl Alfon Yu Ron Carl Alfon Yu
            Votes:
            1 Vote for this issue
            Watchers:
            7 Start watching this issue

              Created:
              Updated:
              Resolved:

                Estimated:
                Original Estimate - 0 minutes
                0m
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 3 weeks, 3 days, 7 hours, 22 minutes
                3w 3d 7h 22m

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