Skip to content

Commit b6ae78c

Browse files
committed
Fixing possible PHP warning
1 parent 207e42a commit b6ae78c

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

main/inc/lib/export.lib.inc.php

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -185,8 +185,13 @@ public static function export_table_pdf($data, $file_name = 'export', $header =
185185
$column = 0;
186186
foreach ($headers as $header) {
187187
$table->setHeaderContents($row, $column, $header);
188-
$attributes = $header_attributes[$column];
189-
$table->updateCellAttributes($row, $column, $attributes);
188+
$attributes = array();
189+
if (isset($header_attributes) && isset($header_attributes[$column])) {
190+
$attributes = $header_attributes[$column];
191+
}
192+
if (!empty($attributes)) {
193+
$table->updateCellAttributes($row, $column, $attributes);
194+
}
190195
$column++;
191196
}
192197
$row++;

0 commit comments

Comments
 (0)