From b68f37cf5bb521f15cb3cbd2c645da670dafccdb Mon Sep 17 00:00:00 2001 From: Shish Date: Tue, 22 Dec 2009 17:05:21 +0000 Subject: [PATCH] ignore orphanned comments --- ext/comment/main.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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(); }