From d33051cb7236a930c1baf879fee75e92c35a93ee Mon Sep 17 00:00:00 2001 From: plegall Date: Thu, 21 Jan 2016 15:10:02 +0100 Subject: update to Smarty 3.1.29 --- include/smarty/libs/sysplugins/smarty_internal_runtime_foreach.php | 3 +++ 1 file changed, 3 insertions(+) (limited to 'include/smarty/libs/sysplugins/smarty_internal_runtime_foreach.php') diff --git a/include/smarty/libs/sysplugins/smarty_internal_runtime_foreach.php b/include/smarty/libs/sysplugins/smarty_internal_runtime_foreach.php index 87bb0cf4a..689636adb 100644 --- a/include/smarty/libs/sysplugins/smarty_internal_runtime_foreach.php +++ b/include/smarty/libs/sysplugins/smarty_internal_runtime_foreach.php @@ -27,6 +27,9 @@ class Smarty_Internal_Runtime_Foreach // thus rewind() and valid() methods may not be present return iterator_count($value->getIterator()); } elseif ($value instanceof Iterator) { + if ($value instanceof Generator) { + return 1; + } return iterator_count($value); } elseif ($value instanceof PDOStatement) { return $value->rowCount(); -- cgit v1.2.3