Skip to content

Commit 2372c42

Browse files
committed
test: remove curl_close call
No-op since PHP 8.0, deprecated with warnings since PHP 8.5.0.
1 parent cfad98a commit 2372c42

1 file changed

Lines changed: 6 additions & 9 deletions

File tree

test/Unit.php

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -50,16 +50,13 @@ function jq_req( $url, array $reqHeaders = [] ) {
5050
return $len;
5151
},
5252
] );
53-
try {
54-
$ret = curl_exec( $ch );
55-
if ( $ret === false ) {
56-
throw new Exception( curl_error( $ch ) );
57-
}
58-
$resp['body'] = $ret;
59-
return $resp;
60-
} finally {
61-
curl_close( $ch );
53+
54+
$ret = curl_exec( $ch );
55+
if ( $ret === false ) {
56+
throw new Exception( curl_error( $ch ) );
6257
}
58+
$resp['body'] = $ret;
59+
return $resp;
6360
}
6461

6562
/**

0 commit comments

Comments
 (0)