scripts.mit.edu
/
autoinstalls
/
wordpress.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Wordpress 4.6
[autoinstalls/wordpress.git]
/
wp-comments-post.php
diff --git
a/wp-comments-post.php
b/wp-comments-post.php
index 2fb148a8dca418ddd9f050e0dc9574b5d25717ad..4e9f1fcfb0e0e339de8e0697af790b4b0116ae8b 100644
(file)
--- a/
wp-comments-post.php
+++ b/
wp-comments-post.php
@@
-19,9
+19,9
@@
nocache_headers();
$comment = wp_handle_comment_submission( wp_unslash( $_POST ) );
if ( is_wp_error( $comment ) ) {
$comment = wp_handle_comment_submission( wp_unslash( $_POST ) );
if ( is_wp_error( $comment ) ) {
- $data =
$comment->get_error_data(
);
+ $data =
intval( $comment->get_error_data()
);
if ( ! empty( $data ) ) {
if ( ! empty( $data ) ) {
- wp_die(
$comment->get_error_message(), $data
);
+ wp_die(
'<p>' . $comment->get_error_message() . '</p>', __( 'Comment Submission Failure' ), array( 'response' => $data, 'back_link' => true )
);
} else {
exit;
}
} else {
exit;
}
@@
-42,7
+42,7
@@
do_action( 'set_comment_cookies', $comment, $user );
$location = empty( $_POST['redirect_to'] ) ? get_comment_link( $comment ) : $_POST['redirect_to'] . '#comment-' . $comment->comment_ID;
/**
$location = empty( $_POST['redirect_to'] ) ? get_comment_link( $comment ) : $_POST['redirect_to'] . '#comment-' . $comment->comment_ID;
/**
- * Filter the location URI to send the commenter after posting.
+ * Filter
s
the location URI to send the commenter after posting.
*
* @since 2.0.5
*
*
* @since 2.0.5
*