Skip to content

Commit fbef503

Browse files
Coding Standards: Use strict comparison in wp-includes/pomo/mo.php.
Follow-up to [10584], [12174]. Props aristath, poena, afercia, SergeyBiryukov. See #57839. git-svn-id: https://develop.svn.wordpress.org/trunk@55931 602fd350-edb4-49c9-b593-d223f7449a82
1 parent 3e2121c commit fbef503

1 file changed

Lines changed: 8 additions & 8 deletions

File tree

src/wp-includes/pomo/mo.php

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -206,9 +206,9 @@ public function get_byteorder( $magic ) {
206206
$magic_little_64 = (int) 2500072158;
207207
// 0xde120495
208208
$magic_big = ( (int) - 569244523 ) & 0xFFFFFFFF;
209-
if ( $magic_little == $magic || $magic_little_64 == $magic ) {
209+
if ( $magic_little === $magic || $magic_little_64 === $magic ) {
210210
return 'little';
211-
} elseif ( $magic_big == $magic ) {
211+
} elseif ( $magic_big === $magic ) {
212212
return 'big';
213213
} else {
214214
return false;
@@ -229,7 +229,7 @@ public function import_from_reader( $reader ) {
229229
$endian = ( 'big' === $endian_string ) ? 'N' : 'V';
230230

231231
$header = $reader->read( 24 );
232-
if ( $reader->strlen( $header ) != 24 ) {
232+
if ( $reader->strlen( $header ) !== 24 ) {
233233
return false;
234234
}
235235

@@ -240,7 +240,7 @@ public function import_from_reader( $reader ) {
240240
}
241241

242242
// Support revision 0 of MO format specs, only.
243-
if ( 0 != $header['revision'] ) {
243+
if ( 0 !== $header['revision'] ) {
244244
return false;
245245
}
246246

@@ -249,23 +249,23 @@ public function import_from_reader( $reader ) {
249249

250250
// Read originals' indices.
251251
$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 ) {
253253
return false;
254254
}
255255

256256
$originals = $reader->read( $originals_lengths_length );
257-
if ( $reader->strlen( $originals ) != $originals_lengths_length ) {
257+
if ( $reader->strlen( $originals ) !== $originals_lengths_length ) {
258258
return false;
259259
}
260260

261261
// Read translations' indices.
262262
$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 ) {
264264
return false;
265265
}
266266

267267
$translations = $reader->read( $translations_lengths_length );
268-
if ( $reader->strlen( $translations ) != $translations_lengths_length ) {
268+
if ( $reader->strlen( $translations ) !== $translations_lengths_length ) {
269269
return false;
270270
}
271271

0 commit comments

Comments
 (0)