Don't request tags if we don't have any events.
authorMichael J. Rubinsky <mrubinsk@horde.org>
Wed, 7 Jul 2010 17:54:48 +0000 (13:54 -0400)
committerMichael J. Rubinsky <mrubinsk@horde.org>
Wed, 7 Jul 2010 17:55:17 +0000 (13:55 -0400)
kronolith/lib/Driver/Sql.php

index 92feaad..a0b32f4 100644 (file)
@@ -275,7 +275,7 @@ class Kronolith_Driver_Sql extends Kronolith_Driver
 
         $events = $this->_listEventsConditional($startDate, $endDate, $conditions, $values);
         $results = array();
-        if ($fetchTags) {
+        if ($fetchTags && count($events)) {
             $tags = Kronolith::getTagger()->getTags(array_keys($events));
         }
         foreach ($events as $id) {