Make WordPress Core

Ticket #58876: 58876.2.diff

File 58876.2.diff, 2.2 KB (added by rajinsharwar, 12 months ago)
  • src/wp-includes/class-wp-http.php

    From d2378d60b78ec3b20c48843b69c0c7d8bd7c2bf2 Mon Sep 17 00:00:00 2001
    From: Rajin Sharwar <rajinsharwar@gmail.com>
    Date: Sat, 22 Jul 2023 16:57:20 +0600
    Subject: [PATCH] Update class-wp-http.php for PHP warning
    
    ---
     src/wp-includes/class-wp-http.php | 6 +++---
     1 file changed, 3 insertions(+), 3 deletions(-)
    
    diff --git a/src/wp-includes/class-wp-http.php b/src/wp-includes/class-wp-http.php
    index e1d37878a1..968b48252f 100644
    a b class WP_Http { 
    326326                );
    327327
    328328                // Ensure redirects follow browser behavior.
    329                 $options['hooks']->register( 'requests.before_redirect', array( get_class(), 'browser_redirect_compatibility' ) );
    330 
     329                $options['hooks']->register( 'requests.before_redirect', array( static::class, 'browser_redirect_compatibility' ) );
     330               
    331331                // Validate redirected URLs.
    332332                if ( function_exists( 'wp_kses_bad_protocol' ) && $parsed_args['reject_unsafe_urls'] ) {
    333                         $options['hooks']->register( 'requests.before_redirect', array( get_class(), 'validate_redirects' ) );
     333                        $options['hooks']->register( 'requests.before_redirect', array( static::class, 'validate_redirects' ) );
    334334                }
    335335
    336336                if ( $parsed_args['stream'] ) {
  • src/wp-includes/class-wp-http.php

    -- 
    2.39.2.windows.1
    
    From 7548663119f08e332e7f21ccbc6856386d396e1c Mon Sep 17 00:00:00 2001
    From: Rajin Sharwar <rajinsharwar@gmail.com>
    Date: Sat, 22 Jul 2023 17:09:07 +0600
    Subject: [PATCH] fixing PHP coding standards issue
    
    ---
     src/wp-includes/class-wp-http.php | 2 +-
     1 file changed, 1 insertion(+), 1 deletion(-)
    
    diff --git a/src/wp-includes/class-wp-http.php b/src/wp-includes/class-wp-http.php
    index 968b48252f..546ba96c1c 100644
    a b class WP_Http { 
    327327
    328328                // Ensure redirects follow browser behavior.
    329329                $options['hooks']->register( 'requests.before_redirect', array( static::class, 'browser_redirect_compatibility' ) );
    330                
     330
    331331                // Validate redirected URLs.
    332332                if ( function_exists( 'wp_kses_bad_protocol' ) && $parsed_args['reject_unsafe_urls'] ) {
    333333                        $options['hooks']->register( 'requests.before_redirect', array( static::class, 'validate_redirects' ) );