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

Moving a block to top can cause warning

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • Trivial
    • Resolution: Fixed
    • 2.1.3, 2.2, 2.3
    • 2.1.4, 2.2.1
    • 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.

    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.

      Attachments

        Issue Links

          Activity

            People

              quen Sam Marshall
              quen Sam Marshall
              Aparup Banerjee Aparup Banerjee
              Ankit Agarwal Ankit Agarwal
              Adrian Greeve, Jake Dallimore, Mathew May, Mihail Geshoski, Sujith Haridasan
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:
                9/Jan/12