mirror of
https://github.com/WordPress/WordPress.git
synced 2024-12-23 01:27:36 +01:00
I18N: Prevent PHP warning in WP_Textdomain_Registry
.
Prevents a warning upon cache invalidation after language pack updates if the arguments don’t have the expected format. Follow-up to [57287], [57290], [57298], [57299]. See #58919. Built from https://develop.svn.wordpress.org/trunk@57303 git-svn-id: http://core.svn.wordpress.org/trunk@56809 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
b9638e6b00
commit
e6a10d45e7
@ -228,7 +228,11 @@ class WP_Textdomain_Registry {
|
|||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function invalidate_mo_files_cache( $upgrader, $hook_extra ) {
|
public function invalidate_mo_files_cache( $upgrader, $hook_extra ) {
|
||||||
if ( 'translation' !== $hook_extra['type'] || array() === $hook_extra['translations'] ) {
|
if (
|
||||||
|
! isset( $hook_extra['type'] ) ||
|
||||||
|
'translation' !== $hook_extra['type'] ||
|
||||||
|
array() === $hook_extra['translations']
|
||||||
|
) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -16,7 +16,7 @@
|
|||||||
*
|
*
|
||||||
* @global string $wp_version
|
* @global string $wp_version
|
||||||
*/
|
*/
|
||||||
$wp_version = '6.5-alpha-57302';
|
$wp_version = '6.5-alpha-57303';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 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