From 6a03ea5001bcee7584dfbb6e2b3302a6f1cf9c79 Mon Sep 17 00:00:00 2001 From: antpb Date: Fri, 26 Aug 2022 18:59:13 +0000 Subject: [PATCH] Coding Standards: Use strict comparisons in `path_is_absolute()`. This patch adjusts conditions to use strict comparisons when comparing `realpath()` in `path_is_absolute()`. Props jrf. See #36308. Built from https://develop.svn.wordpress.org/trunk@53946 git-svn-id: http://core.svn.wordpress.org/trunk@53505 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/functions.php | 4 ++-- wp-includes/version.php | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/wp-includes/functions.php b/wp-includes/functions.php index 12f813fa9d..f5b58315af 100644 --- a/wp-includes/functions.php +++ b/wp-includes/functions.php @@ -2101,11 +2101,11 @@ function path_is_absolute( $path ) { * This is definitive if true but fails if $path does not exist or contains * a symbolic link. */ - if ( realpath( $path ) == $path ) { + if ( realpath( $path ) === $path ) { return true; } - if ( strlen( $path ) == 0 || '.' === $path[0] ) { + if ( strlen( $path ) === 0 || '.' === $path[0] ) { return false; } diff --git a/wp-includes/version.php b/wp-includes/version.php index 8d980a6158..08f180c7e3 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -16,7 +16,7 @@ * * @global string $wp_version */ -$wp_version = '6.1-alpha-53945'; +$wp_version = '6.1-alpha-53946'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.