dWhen executing this code:
$this->items = $object->getItens();
...
foreach($this->items as $item)
{
...yadda yadda $item->getId() yadda yadada
}
within a symfony action, the php engine throws:
Notice: Indirect modification of overloaded property xxxActions::$items has no effect in xxxactions.class.php
That’s related to a php bug , whose implications in symfony are described here. It looks like it’s related to php 5.2. I can see it appears on version 5.2.0 . It looks like the bug is gone in version 5.2.4.
Anyway, the simple workaround: insted of iterate through $this->items, we do:
$items = $object->getItems();
...
foreach($items as $item)
{
...yadda yadda $item->getId() yadda yadda
}
$this->items = $items;
and that’s it.
No Comments on “Beware: bug in php.”
You can track this conversation through its atom feed.