From 028c8e60504546b1ad2342f168bbf5bf3d25f618 Mon Sep 17 00:00:00 2001 From: Steven Wittens Date: Sun, 24 Jun 2007 00:38:40 +0000 Subject: #148678: Fix notices/warnings on invalid paths like 'node/zzz'. (chx/pwolanin/webernet) --- modules/comment/comment.module | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'modules/comment/comment.module') diff --git a/modules/comment/comment.module b/modules/comment/comment.module index bb1dee560..d12798c59 100644 --- a/modules/comment/comment.module +++ b/modules/comment/comment.module @@ -973,7 +973,7 @@ function comment_render($node, $cid = 0) { $order = _comment_get_display_setting('sort'); $comments_per_page = _comment_get_display_setting('comments_per_page'); - if ($cid) { + if ($cid && is_numeric($cid)) { // Single comment view. $query = 'SELECT c.cid, c.pid, c.nid, c.subject, c.comment, c.format, c.timestamp, c.name, c.mail, c.homepage, u.uid, u.name AS registered_name, u.signature, u.picture, u.data, c.score, c.users, c.status FROM {comments} c INNER JOIN {users} u ON c.uid = u.uid WHERE c.cid = %d'; $query_args = array($cid); -- cgit v1.2.3