Upgrade/Install: Fix Yoda condition in wp_opcache_invalidate().
Fixes linting failure due to Yoda condition in `wp_opcache_invalidate()` following [48160]. See #36455. Built from https://develop.svn.wordpress.org/trunk@48161 git-svn-id: http://core.svn.wordpress.org/trunk@47930 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
@@ -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 );
|
||||
|
||||
Reference in New Issue
Block a user