Skip to content

Commit d231e9d

Browse files
authored
PHP 8.5: Prevent deprecation notices for curl_close
`curl_close` is deprecated in PHP 8.5+, and hasn't been doing anything since PHP 8.0. To prevent deprecation warnings it should therefore be called on older versions of PHP only. See https://wiki.php.net/rfc/deprecations_php_8_5#deprecate_no-op_functions_from_the_resource_to_object_conversion.
1 parent e6a0a73 commit d231e9d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tests/Utility/InputValidator/IsCurlHandleTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ final class IsCurlHandleTest extends TestCase {
2222
* Clean up after the tests.
2323
*/
2424
public static function tear_down_after_test() {
25-
if (isset(self::$curl_handle) && is_resource(self::$curl_handle)) {
25+
if (isset(self::$curl_handle) && is_resource(self::$curl_handle) && \PHP_VERSION_ID < 80000) {
2626
curl_close(self::$curl_handle);
2727
}
2828

0 commit comments

Comments
 (0)