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.

git-svn-id: https://develop.svn.wordpress.org/trunk@46210 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Sergey Biryukov
2019-09-20 20:45:58 +00:00
parent 6922b15e3a
commit 6b65af939f
2 changed files with 2 additions and 6 deletions
+1 -3
View File
@@ -95,9 +95,7 @@ function wp_guess_url() {}
function get_file( $path ) {
if ( function_exists( 'realpath' ) ) {
$path = realpath( $path );
}
$path = realpath( $path );
if ( ! $path || ! @is_file( $path ) ) {
return '';