Fixed fseek check in WC_Geo_IP class
This commit is contained in:
parent
ced46ad92b
commit
98abbf0184
|
@ -1468,7 +1468,7 @@ class WC_Geo_IP {
|
||||||
2 * $this->record_length
|
2 * $this->record_length
|
||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
if ( 0 == fseek( $this->filehandle, 2 * $this->record_length * $offset, SEEK_SET ) ) {
|
if ( 0 != fseek( $this->filehandle, 2 * $this->record_length * $offset, SEEK_SET ) ) {
|
||||||
$this->log( 'GeoIP API: fseek failed' );
|
$this->log( 'GeoIP API: fseek failed' );
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -1525,7 +1525,7 @@ class WC_Geo_IP {
|
||||||
2 * $this->record_length
|
2 * $this->record_length
|
||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
if ( 0 == fseek( $this->filehandle, 2 * $this->record_length * $offset, SEEK_SET ) ) {
|
if ( 0 != fseek( $this->filehandle, 2 * $this->record_length * $offset, SEEK_SET ) ) {
|
||||||
$this->log( 'GeoIP API: fseek failed' );
|
$this->log( 'GeoIP API: fseek failed' );
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue