Skip to content

Commit f4e1fb8

Browse files
authored
Merge pull request #52 from wp-cli/47-cast-int
Cast `$response_code` as `(int)` for true strict comparison
2 parents a3023ca + 090a7eb commit f4e1fb8

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/WP_CLI/CommandWithUpgrade.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -257,7 +257,7 @@ protected static function alter_api_response( $response, $version ) {
257257
// check if the requested version exists
258258
$response = wp_remote_head( $response->download_link );
259259
$response_code = wp_remote_retrieve_response_code( $response );
260-
if ( 200 !== $response_code ) {
260+
if ( 200 !== (int) $response_code ) {
261261
if ( is_wp_error( $response ) ) {
262262
$error_msg = $response->get_error_message();
263263
} else {

0 commit comments

Comments
 (0)