Fix notice

git-svn-id: https://develop.svn.wordpress.org/trunk@9540 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Ryan Boren 2008-11-06 01:58:33 +00:00
parent 78977cf037
commit e1235cf59f
1 changed files with 6 additions and 1 deletions

View File

@ -738,8 +738,13 @@ function pings_open( $post_id = NULL ) {
*/ */
function wp_comment_form_unfiltered_html_nonce() { function wp_comment_form_unfiltered_html_nonce() {
global $post; global $post;
$post_id = 0;
if ( !empty($post) )
$post_id = $post->ID;
if ( current_user_can('unfiltered_html') ) 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);
} }
/** /**