From ee41befbee2e640ba74e255e9bd4a15d0fd675d2 Mon Sep 17 00:00:00 2001 From: Michael M Slusarz Date: Sat, 18 Sep 2010 00:26:11 -0600 Subject: [PATCH] Fix warning if no indices exist in object. --- imp/lib/Indices.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) 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() -- 2.11.0