Symfony/Doctrine: Unserialize in action vs template
- by Tom
Hi,
Can anyone tell me why calling "unserialize" works fine in an action but gives an offset error in a template?
It's basically possible to unserialize a database text result into a variable in an action and pass it to template, in which case it displays fine:
$this->clean = unserialize($this->raw);
<?php echo $clean ?>
But not if called directly in a template:
<?php echo unserialize($raw) ?>
Would be interested in knowing why this is so and whether there's some workaround.
Thanks.