Closed nicodemuz closed 6 years ago
I think I know what's going on here, correct me if I'm wrong : you extended \FeedIo\Feed in an Entity class (something like \App\Entity\Feed
or \App\Entity\News
) and you didn't call parent::__construct()
in your Entity class. If so, just add parent::__construct()
in the __construct() of your class and it will work. Not obvious, I should add it in the documentation.
If I'm wrong : could you paste the code please ?
That could have been the issue yeah.. I did a whole bunch of changes last night and got it working..
As a quickfix I had changed the addElement method to:
/**
* @param ElementInterface $element
* @return $this
*/
public function addElement(ElementInterface $element)
{
if ($this->elements === null) {
$this->elements = new \ArrayIterator();
}
$this->elements->append($element);
return $this;
}
Removing the quickfix seems to work now. I'm also calling the parent constructor now for my feed. Thanks for your help! :)
Any idea where I'm going wrong when I see the above error? I'm using the latest RssAtomBundle bundle with Symfony4.