Skip to content

Commit

Permalink
Merge pull request #52 from wp-cli/47-cast-int
Browse files Browse the repository at this point in the history
Cast `$response_code` as `(int)` for true strict comparison
  • Loading branch information
schlessera authored Sep 29, 2017
2 parents a3023ca + 090a7eb commit f4e1fb8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/WP_CLI/CommandWithUpgrade.php
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,7 @@ protected static function alter_api_response( $response, $version ) {
// check if the requested version exists
$response = wp_remote_head( $response->download_link );
$response_code = wp_remote_retrieve_response_code( $response );
if ( 200 !== $response_code ) {
if ( 200 !== (int) $response_code ) {
if ( is_wp_error( $response ) ) {
$error_msg = $response->get_error_message();
} else {
Expand Down

0 comments on commit f4e1fb8

Please sign in to comment.