Make WordPress Core

Ticket #58876: 58876.diff

File 58876.diff, 1.2 KB (added by rajinsharwar, 17 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'] ) {