diff --git a/wp-includes/l10n/class-wp-translation-file-mo.php b/wp-includes/l10n/class-wp-translation-file-mo.php index bf39cc70ec..3f5e72597c 100644 --- a/wp-includes/l10n/class-wp-translation-file-mo.php +++ b/wp-includes/l10n/class-wp-translation-file-mo.php @@ -66,11 +66,13 @@ class WP_Translation_File_MO extends WP_Translation_File { return false; } - if ( self::MAGIC_MARKER === $big ) { + // Force cast to an integer as it can be a float on x86 systems. See https://core.trac.wordpress.org/ticket/60678. + if ( (int) self::MAGIC_MARKER === $big ) { return 'N'; } - if ( self::MAGIC_MARKER === $little ) { + // Force cast to an integer as it can be a float on x86 systems. See https://core.trac.wordpress.org/ticket/60678. + if ( (int) self::MAGIC_MARKER === $little ) { return 'V'; } @@ -203,7 +205,17 @@ class WP_Translation_File_MO extends WP_Translation_File { $hash_addr = $translations_addr + $bytes_for_entries; $entry_offsets = $hash_addr; - $file_header = pack( $this->uint32 . '*', self::MAGIC_MARKER, 0 /* rev */, $entry_count, $originals_addr, $translations_addr, 0 /* hash_length */, $hash_addr ); + $file_header = pack( + $this->uint32 . '*', + // Force cast to an integer as it can be a float on x86 systems. See https://core.trac.wordpress.org/ticket/60678. + (int) self::MAGIC_MARKER, + 0, /* rev */ + $entry_count, + $originals_addr, + $translations_addr, + 0, /* hash_length */ + $hash_addr + ); $o_entries = ''; $t_entries = ''; diff --git a/wp-includes/version.php b/wp-includes/version.php index a3fb020c15..5a3307ef98 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -16,7 +16,7 @@ * * @global string $wp_version */ -$wp_version = '6.5-beta3-57762'; +$wp_version = '6.5-beta3-57763'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.