From c90088b1f6afa6aa15299c9e2f5b47fd7055070f Mon Sep 17 00:00:00 2001 From: Mike Schroder Date: Thu, 25 Jun 2020 07:53:11 +0000 Subject: [PATCH] Upgrade/Install: Fix Yoda condition in `wp_opcache_invalidate()`. Fixes linting failure due to Yoda condition in `wp_opcache_invalidate()` following [48160]. See #36455. git-svn-id: https://develop.svn.wordpress.org/trunk@48161 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-admin/includes/file.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/wp-admin/includes/file.php b/src/wp-admin/includes/file.php index ec01eb799a..1c650ec38e 100644 --- a/src/wp-admin/includes/file.php +++ b/src/wp-admin/includes/file.php @@ -2316,7 +2316,7 @@ function wp_opcache_invalidate( $filepath, $force = false ) { * - https://www.php.net/manual/en/reserved.variables.server.php * - https://core.trac.wordpress.org/ticket/36455 */ - if ( $can_invalidate === null ) { + if ( null === $can_invalidate ) { $can_invalidate = function_exists( 'opcache_invalidate' ) && ( ! ini_get( 'opcache.restrict_api' ) || stripos( realpath( $_SERVER['SCRIPT_FILENAME'] ), ini_get( 'opcache.restrict_api' ) ) === 0 );