@@ -252,8 +252,8 @@ public static function proxyCommon($proxy, $package)
252252
253253 public static function postRaw ($ url , $ param = [], $ option = [])
254254 {
255- if (empty ($ config ['timeout ' ])) {
256- $ config ['timeout ' ] = 30 ;
255+ if (empty ($ option ['timeout ' ])) {
256+ $ option ['timeout ' ] = 30 ;
257257 }
258258 $ sendHeaders = [];
259259 if (!empty ($ option ['header ' ])) {
@@ -268,7 +268,7 @@ public static function postRaw($url, $param = [], $option = [])
268268 curl_setopt ($ ch , CURLOPT_HTTPHEADER , $ sendHeaders );
269269 }
270270 curl_setopt ($ ch , CURLOPT_RETURNTRANSFER , 1 );
271- curl_setopt ($ ch , CURLOPT_TIMEOUT , $ config ['timeout ' ]);
271+ curl_setopt ($ ch , CURLOPT_TIMEOUT , $ option ['timeout ' ]);
272272 curl_setopt ($ ch , CURLOPT_REFERER , $ url );
273273 if (defined ('CURLOPT_IPRESOLVE ' ) && defined ('CURL_IPRESOLVE_V4 ' )) {
274274 curl_setopt ($ ch , CURLOPT_IPRESOLVE , CURL_IPRESOLVE_V4 );
@@ -286,8 +286,8 @@ public static function postRaw($url, $param = [], $option = [])
286286
287287 public static function getRaw ($ url , $ param = [], $ option = [])
288288 {
289- if (empty ($ config ['timeout ' ])) {
290- $ config ['timeout ' ] = 30 ;
289+ if (empty ($ option ['timeout ' ])) {
290+ $ option ['timeout ' ] = 30 ;
291291 }
292292 if (!empty ($ param )) {
293293 $ url = $ url . '? ' . http_build_query ($ param );
@@ -305,7 +305,7 @@ public static function getRaw($url, $param = [], $option = [])
305305 curl_setopt ($ ch , CURLOPT_HTTPHEADER , $ sendHeaders );
306306 }
307307 curl_setopt ($ ch , CURLOPT_RETURNTRANSFER , 1 );
308- curl_setopt ($ ch , CURLOPT_TIMEOUT , $ config ['timeout ' ]);
308+ curl_setopt ($ ch , CURLOPT_TIMEOUT , $ option ['timeout ' ]);
309309 curl_setopt ($ ch , CURLOPT_REFERER , $ url );
310310 if (defined ('CURLOPT_IPRESOLVE ' ) && defined ('CURL_IPRESOLVE_V4 ' )) {
311311 curl_setopt ($ ch , CURLOPT_IPRESOLVE , CURL_IPRESOLVE_V4 );
0 commit comments