WordPress.org

Make WordPress Core

Ticket #47678: 47678-WP_Rewrite-add_endpoint.patch

File 47678-WP_Rewrite-add_endpoint.patch, 939 bytes (added by jrf, 9 months ago)

WP_Rewrite::add_endpoint(): Remove redundant call to func_get_arg()

  • src/wp-includes/class-wp-rewrite.php

    From bead67a00518a917645ae1d901263f6f458650c0 Mon Sep 17 00:00:00 2001
    From: jrfnl <jrfnl@users.noreply.github.com>
    Date: Fri, 19 Jul 2019 20:45:35 +0200
    Subject: [PATCH] WP_Rewrite::add_endpoint(): Remove redundant call to
     `func_get_arg()`
    
    ---
     src/wp-includes/class-wp-rewrite.php | 2 +-
     1 file changed, 1 insertion(+), 1 deletion(-)
    
    diff --git a/src/wp-includes/class-wp-rewrite.php b/src/wp-includes/class-wp-rewrite.php
    index f198225b97..71c0a9d975 100644
    a b class WP_Rewrite { 
    16841684                global $wp;
    16851685
    16861686                // For backward compatibility, if null has explicitly been passed as `$query_var`, assume `true`.
    1687                 if ( true === $query_var || null === func_get_arg( 2 ) ) {
     1687                if ( true === $query_var || null === $query_var ) {
    16881688                        $query_var = $name;
    16891689                }
    16901690                $this->endpoints[] = array( $places, $name, $query_var );