Skip to content

Commit d11fc43

Browse files
committed
Fix issue after merge
1 parent 63632fd commit d11fc43

1 file changed

Lines changed: 2 additions & 3 deletions

File tree

src/Package_Command.php

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1479,12 +1479,11 @@ private function get_github_latest_release_tag( $package_name, $insecure ) {
14791479
$url = "https://api.github.com/repos/{$package_name}/releases/latest";
14801480
$options = [ 'insecure' => $insecure ];
14811481
$response = Utils\http_request( 'GET', $url, null, [], $options );
1482-
if ( 20 !== (int) substr( (string) $response->status_code, 0, 2 ) ) {
14831482

14841483
// Check for successful response and valid JSON
1485-
$package_data = json_decode( $response->body ?? '' );
1484+
$package_data = json_decode( $response->body );
14861485

1487-
if ( 20 !== (int) substr( $response->status_code, 0, 2 )
1486+
if ( 20 !== (int) substr( (string) $response->status_code, 0, 2 )
14881487
|| JSON_ERROR_NONE !== json_last_error()
14891488
|| null === $package_data
14901489
|| ! isset( $package_data->tag_name ) ) {

0 commit comments

Comments
 (0)