diff --git a/code/sitefeatures/PageComment.php b/code/sitefeatures/PageComment.php index cbf9417e..71709b4d 100755 --- a/code/sitefeatures/PageComment.php +++ b/code/sitefeatures/PageComment.php @@ -182,8 +182,9 @@ class PageComment extends DataObject { $this->Parent()->Title ); } + function rss() { - $parentcheck = isset($_REQUEST['pageid']) ? "ParentID = {$_REQUEST['pageid']}" : "ParentID > 0"; + $parentcheck = isset($_REQUEST['pageid']) ? "ParentID = " . (int) $_REQUEST['pageid'] : "ParentID > 0"; $comments = DataObject::get("PageComment", "$parentcheck AND IsSpam=0", "Created DESC", "", 10); if(!isset($comments)) { $comments = new DataObjectSet();