Make WordPress Core

Ticket #58831: 58831-Modernize-use-__DIR__-instead-of-dirname-__FILE__.patch

File 58831-Modernize-use-__DIR__-instead-of-dirname-__FILE__.patch, 790 bytes (added by jrf, 11 months ago)
  • wp-tests-config-sample.php

    From a877b239428344e4324f006e83aa5386633d8325 Mon Sep 17 00:00:00 2001
    From: jrfnl <jrfnl@users.noreply.github.com>
    Date: Wed, 29 Mar 2023 00:40:12 +0200
    Subject: [PATCH] Modernize: use __DIR__ instead of dirname(__FILE__)
    
    __DIR__ was introduced in PHP 5.3.
    ---
     wp-tests-config-sample.php | 2 +-
     1 file changed, 1 insertion(+), 1 deletion(-)
    
    diff --git a/wp-tests-config-sample.php b/wp-tests-config-sample.php
    index 934eda9162..5591ae5184 100644
    a b  
    11<?php
    22
    33/* Path to the WordPress codebase you'd like to test. Add a forward slash in the end. */
    4 define( 'ABSPATH', dirname( __FILE__ ) . '/src/' );
     4define( 'ABSPATH', __DIR__ . '/src/' );
    55
    66/*
    77 * Path to the theme to test with.