From: Michael J. Rubinsky Date: Tue, 11 May 2010 16:25:05 +0000 (-0400) Subject: Exit early if no results X-Git-Url: https://git.internetallee.de/?a=commitdiff_plain;h=8176a01d49ee9a4f1fc62f3e7bfb7d901f542571;p=horde.git Exit early if no results --- diff --git a/framework/ActiveSync/lib/Horde/ActiveSync/Driver/Horde.php b/framework/ActiveSync/lib/Horde/ActiveSync/Driver/Horde.php index 1772c6784..f58c4eaf0 100644 --- a/framework/ActiveSync/lib/Horde/ActiveSync/Driver/Horde.php +++ b/framework/ActiveSync/lib/Horde/ActiveSync/Driver/Horde.php @@ -596,9 +596,11 @@ class Horde_ActiveSync_Driver_Horde extends Horde_ActiveSync_Driver_Base return $return; } - /* Honor range */ + /* Honor range, and don't bother if no results */ $count = count($results); - + if (!$count) { + return $return; + } $this->_logger->info('Horde::getSearchResults found ' . $count . ' matches.'); preg_match('/(.*)\-(.*)/', $range, $matches);