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

Error in tablelib.php with only one column

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Critical
    • Resolution: Fixed
    • Affects Version/s: 2.4.6, 2.5.2
    • Fix Version/s: 2.4.7, 2.5.3
    • Component/s: Libraries
    • Labels:

      Description

      I get the following error with a table with only one column:

      Warning: array_fill() [<a href='function.array-fill'>function.array-fill</a>]: Number of elements must be positive in lib/tablelib.php on line 1043

      It seems to be caused by the "-1" after the count. There is no error without the "-1" or with two columns.

      The change was introduced in MDL-36011.

        Attachments

          Issue Links

            Activity

              People

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

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Fix Release Date:
                  11/Nov/13