Я столкнулся с этой ошибкой и не понял, как ее исправить.ошибка возникает здесь: unset($inenglish[$count]);
public function findAction()
{
$em = $this->getDoctrine()->getManager();
$listEnglishs = $em->getRepository('MDWEBInEnglishBundle:InEnglish')->findBy(array('deleted' => 0,'activated'=>1), array('createdAt' => 'DESC'));
$tags=$em->getRepository('MDWEBActualiteBundle:Tag')->findAll();
$categories=$em->getRepository('MDWEBActualiteBundle:Categorie')->findBy(array('deleted' => 0, 'activated' => 1));
$years = range(date('Y'), 2000);
$request = $this->container->get('request_stack')->getCurrentRequest();
if($request->getMethod() == 'POST')
{
$year=$request->request->get('annee');
$categorie=$request->request->get('categorie');
$tag=$request->request->get('tag');
$count=0;
foreach($listEnglishs as $inenglish){
foreach($tags as $t) {
$t->getId();
if ($inenglish->getCategorie()->getId()!=$categorie && date('Y',strtotime($inenglish->getCreatedAt()->format('Y-m-d')))!=$year && $t->getId()!=$tag ) {
unset($inenglish[$count]);
}
$count++;
}}
}
return $this->render('MDWEBFrontBundle:InEnglish:list.html.twig',array(
'listEnglishs' => $listEnglishs,
'categories'=>$categories,
'tags'=>$tags,
'years'=>$years
));
}