MDL-33814 Output renderers: table cell objects are only created when needed
This commit is contained in:
committed by
Sam Hemelryk
parent
f2fdb7f73a
commit
842a71a6ac
@@ -1447,9 +1447,10 @@ class html_writer {
|
||||
if (!($row instanceof html_table_row)) {
|
||||
$newrow = new html_table_row();
|
||||
|
||||
foreach ($row as $item) {
|
||||
$cell = new html_table_cell();
|
||||
$cell->text = $item;
|
||||
foreach ($row as $cell) {
|
||||
if (!($cell instanceof html_table_cell)) {
|
||||
$cell = new html_table_cell($cell);
|
||||
}
|
||||
$newrow->cells[] = $cell;
|
||||
}
|
||||
$row = $newrow;
|
||||
|
||||
Reference in New Issue
Block a user