WordPress.org

Make WordPress Core

Ticket #49810: 0001-XML-RPC-Removed-workaround-for-PHP-5.2.2-bug.patch

File 0001-XML-RPC-Removed-workaround-for-PHP-5.2.2-bug.patch, 1.0 KB (added by skoskie, 19 months ago)
  • src/xmlrpc.php

    From 51466ca18fead7fd5e74ce466d7c9999bf110919 Mon Sep 17 00:00:00 2001
    From: Shelton Koskie <shelton@eightygrit.com>
    Date: Sat, 4 Apr 2020 11:45:53 -0600
    Subject: [PATCH] XML-RPC: Removed workaround for PHP < 5.2.2 bug
    
    That version of PHP is no longer supported.
    
    Signed-off-by: Shelton Koskie <shelton@eightygrit.com>
    ---
     src/xmlrpc.php | 6 +-----
     1 file changed, 1 insertion(+), 5 deletions(-)
    
    diff --git a/src/xmlrpc.php b/src/xmlrpc.php
    index 00bd97e8df..2fc75c1e7f 100644
    a b define( 'XMLRPC_REQUEST', true ); 
    1515// Some browser-embedded clients send cookies. We don't want them.
    1616$_COOKIE = array();
    1717
    18 // A bug in PHP < 5.2.2 makes $HTTP_RAW_POST_DATA not set by default,
    19 // but we can do it ourself.
    20 if ( ! isset( $HTTP_RAW_POST_DATA ) ) {
    21         $HTTP_RAW_POST_DATA = file_get_contents( 'php://input' );
    22 }
     18$HTTP_RAW_POST_DATA = file_get_contents( 'php://input' );
    2319
    2420// Fix for mozBlog and other cases where '<?xml' isn't on the very first line.
    2521if ( isset( $HTTP_RAW_POST_DATA ) ) {