From 564ca56a7f31fd6c543cdfcdeafe5b65c36ce9e6 Mon Sep 17 00:00:00 2001 From: Julio Montoya Date: Tue, 13 Jan 2009 18:40:00 +0100 Subject: [PATCH] [svn r17682] Minor - warning message avoided --- main/inc/lib/sortabletable.class.php | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/main/inc/lib/sortabletable.class.php b/main/inc/lib/sortabletable.class.php index eaeb20e74e..2a3ad06c0e 100644 --- a/main/inc/lib/sortabletable.class.php +++ b/main/inc/lib/sortabletable.class.php @@ -301,10 +301,13 @@ class SortableTable extends HTML_Table $offset = $pager->getOffsetByPageId(); $from = $offset[0] - 1; $table_data = $this->get_table_data($from); - foreach ($table_data as $index => $row) + if (is_array($table_data)) { - $row = $this->filter_data($row); - $this->addRow($row); + foreach ($table_data as $index => $row) + { + $row = $this->filter_data($row); + $this->addRow($row); + } } $this->altRowAttributes(0, array ('class' => 'row_odd'), array ('class' => 'row_even'), true); foreach ($this->th_attributes as $column => $attributes)