File tree Expand file tree Collapse file tree 2 files changed +7
-12
lines changed Expand file tree Collapse file tree 2 files changed +7
-12
lines changed Original file line number Diff line number Diff line change 2
2
3
3
namespace Curl ;
4
4
5
+ use Curl \ArrayUtil ;
6
+
5
7
class Curl
6
8
{
7
9
const VERSION = '7.1.0 ' ;
@@ -148,8 +150,8 @@ public function buildPostData($data)
148
150
// Manually build a single-dimensional array from a multi-dimensional array as using curl_setopt($ch,
149
151
// CURLOPT_POSTFIELDS, $data) doesn't correctly handle multi-dimensional arrays when files are
150
152
// referenced.
151
- if (\ Curl \ ArrayUtil::is_array_multidim ($ data )) {
152
- $ data = \ Curl \ ArrayUtil::array_flatten_multidim ($ data );
153
+ if (ArrayUtil::is_array_multidim ($ data )) {
154
+ $ data = ArrayUtil::array_flatten_multidim ($ data );
153
155
}
154
156
155
157
// Modify array values to ensure any referenced files are properly handled depending on the support of
Original file line number Diff line number Diff line change @@ -453,38 +453,32 @@ public function setConnectTimeout($seconds)
453
453
*
454
454
* @access public
455
455
* @param $string
456
- *
457
- * @return bool
458
456
*/
459
457
public function setCookieString ($ string )
460
458
{
461
- return $ this ->setOpt (CURLOPT_COOKIE , $ string );
459
+ $ this ->setOpt (CURLOPT_COOKIE , $ string );
462
460
}
463
461
464
462
/**
465
463
* Set Cookie File
466
464
*
467
465
* @access public
468
466
* @param $cookie_file
469
- *
470
- * @return boolean
471
467
*/
472
468
public function setCookieFile ($ cookie_file )
473
469
{
474
- return $ this ->setOpt (CURLOPT_COOKIEFILE , $ cookie_file );
470
+ $ this ->setOpt (CURLOPT_COOKIEFILE , $ cookie_file );
475
471
}
476
472
477
473
/**
478
474
* Set Cookie Jar
479
475
*
480
476
* @access public
481
477
* @param $cookie_jar
482
- *
483
- * @return boolean
484
478
*/
485
479
public function setCookieJar ($ cookie_jar )
486
480
{
487
- return $ this ->setOpt (CURLOPT_COOKIEJAR , $ cookie_jar );
481
+ $ this ->setOpt (CURLOPT_COOKIEJAR , $ cookie_jar );
488
482
}
489
483
490
484
/**
@@ -798,7 +792,6 @@ private function initHandle($curl)
798
792
}
799
793
800
794
$ this ->activeCurls [$ curl ->id ] = $ curl ;
801
- $ this ->responseCookies = array ();
802
795
$ curl ->call ($ curl ->beforeSendFunction );
803
796
}
804
797
}
You can’t perform that action at this time.
0 commit comments