#84443 by Shakur. Do not depend on a url argument being defined.

5.x
Neil Drumm 2006-10-17 08:45:51 +00:00
parent b87692a901
commit ea38bae2a7
1 changed files with 1 additions and 1 deletions

View File

@ -942,7 +942,7 @@ function comment_render($node, $cid = 0) {
/**
* Menu callback; delete a comment.
*/
function comment_delete($cid) {
function comment_delete($cid = NULL) {
$comment = db_fetch_object(db_query('SELECT c.*, u.name AS registered_name, u.uid FROM {comments} c INNER JOIN {users} u ON u.uid = c.uid WHERE c.cid = %d', $cid));
$comment->name = $comment->uid ? $comment->registered_name : $comment->name;