From: Michael M Slusarz Date: Sat, 18 Sep 2010 06:26:11 +0000 (-0600) Subject: Fix warning if no indices exist in object. X-Git-Url: https://git.internetallee.de/?a=commitdiff_plain;h=ee41befbee2e640ba74e255e9bd4a15d0fd675d2;p=horde.git Fix warning if no indices exist in object. --- diff --git a/imp/lib/Indices.php b/imp/lib/Indices.php index 208af0829..b70edafb2 100644 --- a/imp/lib/Indices.php +++ b/imp/lib/Indices.php @@ -203,8 +203,9 @@ class IMP_Indices implements Countable, Iterator public function rewind() { - reset($this->_indices); - reset(current($this->_indices)); + if (reset($this->_indices)) { + reset(current($this->_indices)); + } } public function valid()