diff --git a/ext/comment/main.php b/ext/comment/main.php index 615e749b..35bf2214 100644 --- a/ext/comment/main.php +++ b/ext/comment/main.php @@ -250,7 +250,7 @@ class CommentList extends SimpleExtension { while(!$result->EOF) { $image = Image::by_id($result->fields["image_id"]); $comments = $this->get_comments($image->id); - $images[] = array($image, $comments); + if(!is_null($image)) $images[] = array($image, $comments); $result->MoveNext(); }