From 37d3aa1695198886ebb37849e2dffaf04bd5346b Mon Sep 17 00:00:00 2001 From: Sam Minnee Date: Fri, 8 Aug 2008 04:58:31 +0000 Subject: [PATCH] Improved behaviour of ViewableData_Iterator. It's not clear why, but this was causing a bug on our build slave. Maybe a PHP version difference? git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@60178 467b73ca-7a2a-4603-9d3b-597d59a354a9 --- core/ViewableData.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/core/ViewableData.php b/core/ViewableData.php index 3de8bb850..3789b3a47 100644 --- a/core/ViewableData.php +++ b/core/ViewableData.php @@ -1172,7 +1172,12 @@ class ViewableData_Iterator implements Iterator { * Get the next object. */ public function next() { - return $this->show = false; + if($this->show) { + $this->show = false; + return $this->viewableData; + } else { + return null; + } } /**