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

Moving a block to top can cause warning

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Trivial Trivial
    • 2.1.4, 2.2.1
    • 2.1.3, 2.2, 2.3
    • Blocks
    • MOODLE_21_STABLE, MOODLE_22_STABLE, MOODLE_23_STABLE
    • MOODLE_21_STABLE, MOODLE_22_STABLE
    • MDL-30655-master
    • Hide

      EASY

      (Must use a server with debug level set to a suitable value, such as DEVELOPER.)

      0. Go to any course page with more than one block in a column. Turn editing on.
      1. Edit the top block. Set the 'Weight on this page' option to -10.
      2. Move any other block by clicking on the 'move' arrows, then clicking in the marked space above the top block.

      Expected result: Block moves into position without error.
      Actual result: You get the PHP warnings quoted in description.

      Show
      EASY (Must use a server with debug level set to a suitable value, such as DEVELOPER.) 0. Go to any course page with more than one block in a column. Turn editing on. 1. Edit the top block. Set the 'Weight on this page' option to -10. 2. Move any other block by clicking on the 'move' arrows, then clicking in the marked space above the top block. Expected result: Block moves into position without error. Actual result: You get the PHP warnings quoted in description.

      If you move a block to the top of the page, when the CURRENT block at top of page has weight -10, this causes PHP warnings:

      Notice: Undefined offset: -11 in /html/lib/blocklib.php on line 1470
      Warning: Invalid argument supplied for foreach() in /html/lib/blocklib.php on line 1470

      This is a trivial problem because the block does move into position correctly once you click Continue.

            quen Sam Marshall
            quen Sam Marshall
            Aparup Banerjee Aparup Banerjee
            Ankit Agarwal Ankit Agarwal
            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.