Index: wp-includes/l10n/class-wp-translation-file-mo.php
===================================================================
--- wp-includes/l10n/class-wp-translation-file-mo.php	(revision 60707)
+++ wp-includes/l10n/class-wp-translation-file-mo.php	(working copy)
@@ -13,6 +13,7 @@
  * @since 6.5.0
  */
 class WP_Translation_File_MO extends WP_Translation_File {
+
 	/**
 	 * Endian value.
 	 *
@@ -34,6 +35,18 @@
 	const MAGIC_MARKER = 0x950412de;
 
 	/**
+	 * Normalize unpacked uint32 values to integers.
+	 *
+	 * Prevents float-to-int cast warnings on PHP 8.5+.
+	 *
+	 * @param mixed $value Value from unpack().
+	 * @return int
+	 */
+	private function normalize_uint32( $value ): int {
+		return (int) ( $value & 0xFFFFFFFF );
+	}
+
+	/**
 	 * Detects endian and validates file.
 	 *
 	 * @since 6.5.0
@@ -54,6 +67,8 @@
 			return false;
 		}
 
+		$big = $this->normalize_uint32( $big );
+
 		$little = unpack( 'V', $header );
 
 		if ( false === $little ) {
@@ -66,13 +81,15 @@
 			return false;
 		}
 
+		$little = $this->normalize_uint32( $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 === $big ) {
+		if ( self::MAGIC_MARKER === $big ) {
 			return 'N';
 		}
 
 		// 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 ) {
+		if ( self::MAGIC_MARKER === $little ) {
 			return 'V';
 		}
 
@@ -115,12 +132,20 @@
 			return false;
 		}
 
-		$offsets = unpack( "{$this->uint32}rev/{$this->uint32}total/{$this->uint32}originals_addr/{$this->uint32}translations_addr/{$this->uint32}hash_length/{$this->uint32}hash_addr", $offsets );
+		$offsets = unpack(
+			"{$this->uint32}rev/{$this->uint32}total/{$this->uint32}originals_addr/{$this->uint32}translations_addr/{$this->uint32}hash_length/{$this->uint32}hash_addr",
+			$offsets
+		);
 
 		if ( false === $offsets ) {
 			return false;
 		}
 
+		// Normalize all unpacked uint32 values to prevent PHP 8.5 float warnings.
+		foreach ( $offsets as $key => $value ) {
+			$offsets[ $key ] = $this->normalize_uint32( $value );
+		}
+
 		$offsets['originals_length']    = $offsets['translations_addr'] - $offsets['originals_addr'];
 		$offsets['translations_length'] = $offsets['hash_addr'] - $offsets['translations_addr'];
 
@@ -146,6 +171,12 @@
 				continue;
 			}
 
+			// Normalize unpacked values.
+			$o['length'] = $this->normalize_uint32( $o['length'] );
+			$o['pos']    = $this->normalize_uint32( $o['pos'] );
+			$t['length'] = $this->normalize_uint32( $t['length'] );
+			$t['pos']    = $this->normalize_uint32( $t['pos'] );
+
 			$original    = substr( $file_contents, $o['pos'], $o['length'] );
 			$translation = substr( $file_contents, $t['pos'], $t['length'] );
 			// GlotPress bug.
@@ -207,7 +238,6 @@
 
 		$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,
@@ -236,4 +266,4 @@
 
 		return $file_header . $o_addr . $t_addr . $o_entries . $t_entries;
 	}
-}
+}
\ No newline at end of file
