From f83ca264891ab42b689113fec31d9a8bc2b8a1aa Mon Sep 17 00:00:00 2001 From: Marco Villegas Date: Sat, 5 Feb 2011 23:42:56 -0500 Subject: [PATCH] bug #1039888 by marvil07 | slurslee: Fixed Comment preview causes out of memory error. --- vud_comment/vud_comment.module | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) diff --git vud_comment/vud_comment.module vud_comment/vud_comment.module index b197828..f126af1 100644 --- vud_comment/vud_comment.module +++ vud_comment/vud_comment.module @@ -107,6 +107,9 @@ function vud_comment_admin_settings_validate($form, &$form_state) { function vud_comment_comment(&$comment, $op) { switch ($op) { case 'view': + if (!isset($comment->cid)) { + return; + } $type = _vud_comment_get_node_type($comment->nid); $comment_allow = in_array($type, variable_get('vud_comment_node_types', array()), TRUE); if ($comment_allow && user_access('use vote up/down on comments')) { -- 1.7.2.3