summaryrefslogtreecommitdiff
path: root/modules/comment/comment.module
diff options
context:
space:
mode:
authorSteven Wittens <steven@10.no-reply.drupal.org>2007-06-24 00:38:40 +0000
committerSteven Wittens <steven@10.no-reply.drupal.org>2007-06-24 00:38:40 +0000
commit028c8e60504546b1ad2342f168bbf5bf3d25f618 (patch)
treeabff3976f64cfab51a953c05a178de43e8e03bcb /modules/comment/comment.module
parentb1d45297e7ea4b26c7b8f484bddae704a26e2c34 (diff)
downloadbrdo-028c8e60504546b1ad2342f168bbf5bf3d25f618.tar.gz
brdo-028c8e60504546b1ad2342f168bbf5bf3d25f618.tar.bz2
#148678: Fix notices/warnings on invalid paths like 'node/zzz'. (chx/pwolanin/webernet)
Diffstat (limited to 'modules/comment/comment.module')
-rw-r--r--modules/comment/comment.module2
1 files changed, 1 insertions, 1 deletions
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);