Make WordPress Core

Ticket #48965: wp-comments-post.php.patch

File wp-comments-post.php.patch, 472 bytes (added by pikamander2, 5 years ago)

Use strict comparisons and yoda conditions

  • wp-comments-post.php

     
    55 * @package WordPress
    66 */
    77
    8 if ( 'POST' != $_SERVER['REQUEST_METHOD'] ) {
     8if ( 'POST' !== $_SERVER['REQUEST_METHOD'] ) {
    99        $protocol = $_SERVER['SERVER_PROTOCOL'];
    1010        if ( ! in_array( $protocol, array( 'HTTP/1.1', 'HTTP/2', 'HTTP/2.0' ) ) ) {
    1111                $protocol = 'HTTP/1.0';