mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-06-28 14:20:15 +00: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. git-svn-id: https://develop.svn.wordpress.org/trunk@57303 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -228,7 +228,11 @@ class WP_Textdomain_Registry {
|
||||
* @return void
|
||||
*/
|
||||
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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user