Make WordPress Core


Ignore:
Timestamp:
09/20/2019 08:45:58 PM (4 years ago)
Author:
SergeyBiryukov
Message:

Code Modernization: Remove conditional use of PHP realpath().

The realpath() function was introduced in PHP 4.0.0. There's no point in checking if the function exists in PHP 5.6+, in only 2 instances out of 29.

Props jrf.
Fixes #48075.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/includes/noop.php

    r46206 r46210  
    9696function get_file( $path ) {
    9797
    98     if ( function_exists( 'realpath' ) ) {
    99         $path = realpath( $path );
    100     }
     98    $path = realpath( $path );
    10199
    102100    if ( ! $path || ! @is_file( $path ) ) {
Note: See TracChangeset for help on using the changeset viewer.