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-includes/class-wp-editor.php

    r45932 r46210  
    492492                                $path = WP_CONTENT_DIR . $path . '/langs/';
    493493
    494                                 if ( function_exists( 'realpath' ) ) {
    495                                     $path = trailingslashit( realpath( $path ) );
    496                                 }
     494                                $path = trailingslashit( realpath( $path ) );
    497495
    498496                                if ( @is_file( $path . $mce_locale . '.js' ) ) {
Note: See TracChangeset for help on using the changeset viewer.