ignore orphanned comments

This commit is contained in:
Shish 2009-12-22 17:05:21 +00:00
parent 80d8f4cfb0
commit b68f37cf5b

View File

@ -250,7 +250,7 @@ class CommentList extends SimpleExtension {
while(!$result->EOF) { while(!$result->EOF) {
$image = Image::by_id($result->fields["image_id"]); $image = Image::by_id($result->fields["image_id"]);
$comments = $this->get_comments($image->id); $comments = $this->get_comments($image->id);
$images[] = array($image, $comments); if(!is_null($image)) $images[] = array($image, $comments);
$result->MoveNext(); $result->MoveNext();
} }