mirror of
https://github.com/WordPress/WordPress.git
synced 2024-12-23 09:37:42 +01:00
Upgrade/Install: Improve wp_opcache_invalidate()
performance.
Changes from using `preg_match()` based `.php` extension checking to using `substr()` in `wp_opcache_invalidate()`. Props jnylen0, aaroncampbell, SergeyBiryukov, desrosj, mikeschroder. Fixes #50784. Built from https://develop.svn.wordpress.org/trunk@48657 git-svn-id: http://core.svn.wordpress.org/trunk@48419 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
c461697c31
commit
8c3d56919e
@ -2356,7 +2356,7 @@ function wp_opcache_invalidate( $filepath, $force = false ) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Verify that file to be invalidated has a PHP extension.
|
// Verify that file to be invalidated has a PHP extension.
|
||||||
if ( ! preg_match( '/\.(?:php)$/i', $filepath ) ) {
|
if ( '.php' !== strtolower( substr( $filepath, -4 ) ) ) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -13,7 +13,7 @@
|
|||||||
*
|
*
|
||||||
* @global string $wp_version
|
* @global string $wp_version
|
||||||
*/
|
*/
|
||||||
$wp_version = '5.5-beta4-48656';
|
$wp_version = '5.5-beta4-48657';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||||
|
Loading…
Reference in New Issue
Block a user