mirror of
https://github.com/WordPress/WordPress.git
synced 2024-12-22 09:07:59 +01:00
Avoid an undefined index notice when submitting a comment with JavaScript disabled. fixes #24752.
Built from https://develop.svn.wordpress.org/trunk@25121 git-svn-id: http://core.svn.wordpress.org/trunk@25101 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
4e4e9f6bee
commit
c7b00aeb98
@ -60,8 +60,8 @@ if ( $user->exists() ) {
|
||||
$comment_author = wp_slash( $user->display_name );
|
||||
$comment_author_email = wp_slash( $user->user_email );
|
||||
$comment_author_url = wp_slash( $user->user_url );
|
||||
if ( current_user_can('unfiltered_html') ) {
|
||||
if ( wp_create_nonce('unfiltered-html-comment_' . $comment_post_ID) != $_POST['_wp_unfiltered_html_comment'] ) {
|
||||
if ( current_user_can( 'unfiltered_html' ) && isset( $_POST['_wp_unfiltered_html_comment'] ) ) {
|
||||
if ( wp_create_nonce( 'unfiltered-html-comment_' . $comment_post_ID ) != $_POST['_wp_unfiltered_html_comment'] ) {
|
||||
kses_remove_filters(); // start with a clean slate
|
||||
kses_init_filters(); // set up the filters
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user