MDL-42112 tablelib: Generate the correct number of cols for empty rows

(And a test for it).
This commit is contained in:
Damyon Wiese
2013-10-18 11:53:52 +08:00
parent 690d3ed5fa
commit 691a2cc881
2 changed files with 22 additions and 1 deletions
+1 -1
View File
@@ -1040,7 +1040,7 @@ class flexible_table {
// Print empty rows to fill the table to the current pagesize.
// This is done so the header aria-controls attributes do not point to
// non existant elements.
$emptyrow = array_fill(0, count($this->columns) - 1, '');
$emptyrow = array_fill(0, count($this->columns), '');
while ($this->currentrow < $this->pagesize) {
$this->print_row($emptyrow, 'emptyrow');
}