Ticket #17159: wp-comments-post.diff
| File wp-comments-post.diff, 835 bytes (added by , 16 years ago) |
|---|
-
wp-comments-post.php
5 5 * @package WordPress 6 6 */ 7 7 8 if ( 'POST' != $_SERVER['REQUEST_METHOD'] ) { 8 if ( 'POST' !== $_SERVER['REQUEST_METHOD'] ) { 9 header('HTTP/1.1 405 Method Not Allowed'); 9 10 header('Allow: POST'); 10 header('HTTP/1.1 405 Method Not Allowed');11 11 header('Content-Type: text/plain'); 12 12 exit; 13 13 } … … 19 19 20 20 $comment_post_ID = isset($_POST['comment_post_ID']) ? (int) $_POST['comment_post_ID'] : 0; 21 21 22 if ( $comment_post_ID === 0 ) 23 wp_die( __( 'A comment must be associated with a WordPress post id.' ), __( 'Invalid request' ), array( 'response'=>400 ) ); 24 22 25 $post = get_post($comment_post_ID); 23 26 24 27 if ( empty($post->comment_status) ) {
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)