Make WordPress Core

Ticket #50085: 50085.patch

File 50085.patch, 1.3 KB (added by ayeshrajans, 5 years ago)
  • src/wp-includes/class-requests.php

    diff --git a/src/wp-includes/class-requests.php b/src/wp-includes/class-requests.php
    index e9773800cb..059b8e72c4 100644
    a b public static function autoloader($class) { 
    142142                }
    143143
    144144                $file = str_replace('_', '/', $class);
    145                 if (file_exists(dirname(__FILE__) . '/' . $file . '.php')) {
    146                         require_once(dirname(__FILE__) . '/' . $file . '.php');
     145                if (file_exists(__DIR__ . '/' . $file . '.php')) {
     146                        require_once __DIR__ . '/' . $file . '.php';
    147147                }
    148148        }
    149149
    public static function get_certificate_path() { 
    537537                        return Requests::$certificate_path;
    538538                }
    539539
    540                 return dirname(__FILE__) . '/Requests/Transport/cacert.pem';
     540                return __DIR__ . '/Requests/Transport/cacert.pem';
    541541        }
    542542
    543543        /**
  • wp-tests-config-sample.php

    diff --git a/wp-tests-config-sample.php b/wp-tests-config-sample.php
    index 7e87d5f6d3..5c978c0aec 100644
    a b  
    22
    33/* Path to the WordPress codebase you'd like to test. Add a forward slash in the end. */
    44if ( defined( 'WP_RUN_CORE_TESTS' ) && WP_RUN_CORE_TESTS ) {
    5         define( 'ABSPATH', dirname( __FILE__ ) . '/build/' );
     5        define( 'ABSPATH', __DIR__ . '/build/' );
    66} else {
    7         define( 'ABSPATH', dirname( __FILE__ ) . '/src/' );
     7        define( 'ABSPATH', __DIR__ . '/src/' );
    88}
    99
    1010/*