From e1235cf59fcbb34431c547cf7421ab61c801749e Mon Sep 17 00:00:00 2001 From: Ryan Boren Date: Thu, 6 Nov 2008 01:58:33 +0000 Subject: [PATCH] Fix notice git-svn-id: https://develop.svn.wordpress.org/trunk@9540 602fd350-edb4-49c9-b593-d223f7449a82 --- wp-includes/comment-template.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/wp-includes/comment-template.php b/wp-includes/comment-template.php index e4840eab0f..dd74060129 100644 --- a/wp-includes/comment-template.php +++ b/wp-includes/comment-template.php @@ -738,8 +738,13 @@ function pings_open( $post_id = NULL ) { */ function wp_comment_form_unfiltered_html_nonce() { global $post; + + $post_id = 0; + if ( !empty($post) ) + $post_id = $post->ID; + if ( current_user_can('unfiltered_html') ) - wp_nonce_field('unfiltered-html-comment_' . $post->ID, '_wp_unfiltered_html_comment', false); + wp_nonce_field('unfiltered-html-comment_' . $post_id, '_wp_unfiltered_html_comment', false); } /**