Skip to content

Commit

Permalink
Avoid PHP deprecation notices in PHP 8.1.x (#5899)
Browse files Browse the repository at this point in the history
  • Loading branch information
christianwach committed Feb 10, 2024
1 parent a5e054e commit e516414
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions php/utils.php
Original file line number Diff line number Diff line change
Expand Up @@ -825,7 +825,7 @@ function http_request( $method, $url, $data = null, $headers = [], $options = []
if ( $halt_on_error ) {
WP_CLI::error( $error_msg );
}
throw new RuntimeException( $error_msg, null, $exception );
throw new RuntimeException( $error_msg, 0, $exception );
}

$warning = sprintf(
Expand All @@ -846,7 +846,7 @@ function http_request( $method, $url, $data = null, $headers = [], $options = []
if ( $halt_on_error ) {
WP_CLI::error( $error_msg );
}
throw new RuntimeException( $error_msg, null, $exception );
throw new RuntimeException( $error_msg, 0, $exception );
}
throw $exception;
}
Expand Down

0 comments on commit e516414

Please sign in to comment.