Skip to content

Commit

Permalink
ignore comments for not existing articles
Browse files Browse the repository at this point in the history
  • Loading branch information
takeit committed Jan 4, 2016
1 parent 61874c9 commit a2a38ef
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -489,6 +489,10 @@ private function createCommentsArray($pagination, $imageService)
foreach ($pagination as $comment) {
$comment = $comment[0];
$thread = $em->getRepository('Newscoop\Entity\Article')->findOneBy(array('number' => $comment->getThread()));
if (!$thread) {
continue;
}

$threadSection = $thread->getSection();

if (!$threadSection) {
Expand Down

0 comments on commit a2a38ef

Please sign in to comment.