Make WordPress Core


Ignore:
Timestamp:
11/24/2022 10:09:39 PM (2 years ago)
Author:
audrasjb
Message:

Coding Standards: Remove extra slashes when concatenating ABSPATH with a path.

Since ABSPATH is defined and documented to end with a forward slash /, this changeset removes the first / from strings appended to ABSPATH in various files, leading to // in the resulting path.

Props TobiasBg, audrasjb, SergeyBiryukov, emanuelx.
Fixes #57074.
See #57071.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tests/phpunit/tests/pluggable/signatures.php

    r54716 r54872  
    7777    public function get_defined_pluggable_functions() {
    7878
    79         require_once ABSPATH . '/wp-admin/includes/upgrade.php';
     79        require_once ABSPATH . 'wp-admin/includes/upgrade.php';
    8080
    8181        $test_functions = array(
     
    104104
    105105        foreach ( $test_files as $file ) {
    106             preg_match_all( '#^\t?function (\w+)#m', file_get_contents( ABSPATH . '/' . $file ), $functions );
     106            preg_match_all( '#^\t?function (\w+)#m', file_get_contents( ABSPATH . $file ), $functions );
    107107
    108108            foreach ( $functions[1] as $function ) {
Note: See TracChangeset for help on using the changeset viewer.