瀏覽代碼

[PHP 8.4] Fix: Curl `CURLOPT_BINARYTRANSFER` deprecated

The `CURLOPT_BINARYTRANSFER` PHP constant from the Curl extension was no-op since
PHP 5.1, and is deprecated in PHP 8.4. This removes the constant usage to avoid
the deprecation notice in PHP 8.4 and later.

Because this constant was no-op since PHP 5.1 (circa 2005), this change has no
impact.

See:

 - [PHP.Watch - PHP 8.4 - Curl: CURLOPT_BINARYTRANSFER deprecated](https://php.watch/versions/8.4/CURLOPT_BINARYTRANSFER-deprecated)
 - [commit](https://github.com/php/php-src/commit/fc16285538e96ecb35d017231051f83dcbd8b55b)
Ayesh Karunaratne 2 年之前
父節點
當前提交
d705dc101b
共有 1 個文件被更改,包括 1 次插入2 次删除
  1. 1 2
      api/functions/normal-functions.php

+ 1 - 2
api/functions/normal-functions.php

@@ -848,7 +848,6 @@ function download($url, $path)
 	$ch = curl_init($url);
 	curl_setopt($ch, CURLOPT_HEADER, 1);
 	curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
-	curl_setopt($ch, CURLOPT_BINARYTRANSFER, 1);
 	curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
 	curl_setopt($ch, CURLOPT_CAINFO, getCert());
 	if (localURL($url)) {
@@ -915,4 +914,4 @@ function utf8ize($mixed)
 		return mb_convert_encoding($mixed, "UTF-8", "UTF-8");
 	}
 	return $mixed;
-}
+}