Hello phptal users,

I have a problem with PHPTAL and PDO (www.php.net/pdo) when i use tal:repeat.
PHPTAL_RepeatController seems angry with PDOStatement.

PDOStatement is not "Iterator" but it's "Traversable"
I changed the following code (RepeatController line 58) :

if ($source instanceof IteratorAggregate) $source = $source->getIterator(); else if (!is_array($source) && !($source instanceof Iterator)) $source = array();

with

if ($source instanceof IteratorAggregate) $source = $source->getIterator(); else if (!is_array($source) && !($source instanceof Iterator) && !($source instanceof Traversable)) $source = array();

but i'm not sure that it's the good or the best solution.


--

*Julien
*

_______________________________________________
PHPTAL mailing list
PHPTAL@lists.motion-twin.com
http://lists.motion-twin.com/mailman/listinfo/phptal

Reply via email to