-bugfix of Iterator object handling in internal _count() method

This commit is contained in:
uwe.tews@googlemail.com
2011-01-16 16:22:58 +00:00
parent 7dfb27d322
commit d494d0db22
2 changed files with 2 additions and 1 deletions

View File

@@ -1,6 +1,7 @@
===== SVN trunk =====
16/01/2011
-bugfix of ArrayAccess object handling in internal _count() method
-bugfix of Iterator object handling in internal _count() method
14/01/2011
-bugfix removed memory leak while processing compileAllTemplates

View File

@@ -864,7 +864,7 @@ class Smarty_Internal_Template extends Smarty_Internal_Data {
} elseif ($value instanceof Iterator) {
$value->rewind();
if ($value->valid()) {
return 1;
return iterator_count($value);
}
} elseif ($value instanceof PDOStatement) {
return $value->rowCount();