From 5e85df653f78c95b8697adffef1256df488fe8b2 Mon Sep 17 00:00:00 2001 From: Ben Klang Date: Mon, 13 Sep 2010 12:53:45 -0400 Subject: [PATCH] Avoid warnings when not subtotaling columns --- hermes/lib/Api.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/hermes/lib/Api.php b/hermes/lib/Api.php index 86329f760..60a3399fe 100644 --- a/hermes/lib/Api.php +++ b/hermes/lib/Api.php @@ -145,9 +145,13 @@ class Hermes_Api extends Horde_Registry_Api } else { $time_data[$key]['_client_name'] = $row['client']; } - $column[$key] = $time_data[$key][$subtotal_column]; + if (!is_null($subtotal_column)) { + $column[$key] = $time_data[$key][$subtotal_column]; + } + } + if (!is_null($subtotal_column)) { + array_multisort($column, SORT_ASC, $time_data); } - array_multisort($column, SORT_ASC, $time_data); } $total_hours = 0.0; -- 2.11.0