我得到了这种类型的错误:
ContextErrorException:警告:在/var/www/html/imsdmo/vendor/friendsofsymfony/message bundle/FOS/MessageBundle/Entity/Thread.php第81行中为foreach()提供的参数无效
请帮我解决这个错误。。。
protected function getParticipantsCollection()
{
if ($this->participants == null) {
$this->participants = new ArrayCollection();
/* Line 81*/ foreach ($this->metadata as $data) {
$this->participants->add($data->getParticipant());
}
}
return $this->participants;
}
这是给出错误的代码
我得到了为什么会发生的问题,因为每当我对数据库进行架构更新时,它都会占用MyBundle/Resources/config/donity YML文件,而不是像FosMessageBundle那样更新我的数据库。。。所以当我删除/config/moritrine文件夹,然后进行架构更新时,它工作得很好。。。