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

Moving a block to top can cause warning

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Trivial
    • Resolution: Fixed
    • Affects Version/s: 2.1.3, 2.2, 2.3
    • Fix Version/s: 2.1.4, 2.2.1
    • Component/s: Blocks
    • Labels:
    • Testing Instructions:
      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.
    • Affected Branches:
      MOODLE_21_STABLE, MOODLE_22_STABLE, MOODLE_23_STABLE
    • Fixed Branches:
      MOODLE_21_STABLE, MOODLE_22_STABLE
    • Pull Master Branch:
      MDL-30655-master

      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.

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

                People

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

                  Dates

                  • Created:
                    Updated:
                    Resolved:
                    Fix Release Date:
                    9/Jan/12