Changeset 55931 for trunk/src/wp-includes/pomo/mo.php
- Timestamp:
- 06/17/2023 10:26:24 AM (15 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/pomo/mo.php
r53957 r55931 207 207 // 0xde120495 208 208 $magic_big = ( (int) - 569244523 ) & 0xFFFFFFFF; 209 if ( $magic_little == $magic || $magic_little_64== $magic ) {209 if ( $magic_little === $magic || $magic_little_64 === $magic ) { 210 210 return 'little'; 211 } elseif ( $magic_big == $magic ) {211 } elseif ( $magic_big === $magic ) { 212 212 return 'big'; 213 213 } else { … … 230 230 231 231 $header = $reader->read( 24 ); 232 if ( $reader->strlen( $header ) != 24 ) {232 if ( $reader->strlen( $header ) !== 24 ) { 233 233 return false; 234 234 } … … 241 241 242 242 // Support revision 0 of MO format specs, only. 243 if ( 0 != $header['revision'] ) {243 if ( 0 !== $header['revision'] ) { 244 244 return false; 245 245 } … … 250 250 // Read originals' indices. 251 251 $originals_lengths_length = $header['translations_lengths_addr'] - $header['originals_lengths_addr']; 252 if ( $originals_lengths_length != $header['total'] * 8 ) {252 if ( $originals_lengths_length !== $header['total'] * 8 ) { 253 253 return false; 254 254 } 255 255 256 256 $originals = $reader->read( $originals_lengths_length ); 257 if ( $reader->strlen( $originals ) != $originals_lengths_length ) {257 if ( $reader->strlen( $originals ) !== $originals_lengths_length ) { 258 258 return false; 259 259 } … … 261 261 // Read translations' indices. 262 262 $translations_lengths_length = $header['hash_addr'] - $header['translations_lengths_addr']; 263 if ( $translations_lengths_length != $header['total'] * 8 ) {263 if ( $translations_lengths_length !== $header['total'] * 8 ) { 264 264 return false; 265 265 } 266 266 267 267 $translations = $reader->read( $translations_lengths_length ); 268 if ( $reader->strlen( $translations ) != $translations_lengths_length ) {268 if ( $reader->strlen( $translations ) !== $translations_lengths_length ) { 269 269 return false; 270 270 }
Note: See TracChangeset
for help on using the changeset viewer.