Skip to content

Commit de1869b

Browse files
committed
Return boolean when calling setCookieFile() and setCookieJar()
1 parent d2ee158 commit de1869b

File tree

2 files changed

+12
-4
lines changed

2 files changed

+12
-4
lines changed

src/Curl/Curl.php

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -819,21 +819,25 @@ public function setCookieString($string)
819819
*
820820
* @access public
821821
* @param $cookie_file
822+
*
823+
* @return boolean
822824
*/
823825
public function setCookieFile($cookie_file)
824826
{
825-
$this->setOpt(CURLOPT_COOKIEFILE, $cookie_file);
827+
return $this->setOpt(CURLOPT_COOKIEFILE, $cookie_file);
826828
}
827829

828830
/**
829831
* Set Cookie Jar
830832
*
831833
* @access public
832834
* @param $cookie_jar
835+
*
836+
* @return boolean
833837
*/
834838
public function setCookieJar($cookie_jar)
835839
{
836-
$this->setOpt(CURLOPT_COOKIEJAR, $cookie_jar);
840+
return $this->setOpt(CURLOPT_COOKIEJAR, $cookie_jar);
837841
}
838842

839843
/**

src/Curl/MultiCurl.php

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -453,21 +453,25 @@ public function setCookieString($string)
453453
*
454454
* @access public
455455
* @param $cookie_file
456+
*
457+
* @return boolean
456458
*/
457459
public function setCookieFile($cookie_file)
458460
{
459-
$this->setOpt(CURLOPT_COOKIEFILE, $cookie_file);
461+
return $this->setOpt(CURLOPT_COOKIEFILE, $cookie_file);
460462
}
461463

462464
/**
463465
* Set Cookie Jar
464466
*
465467
* @access public
466468
* @param $cookie_jar
469+
*
470+
* @return boolean
467471
*/
468472
public function setCookieJar($cookie_jar)
469473
{
470-
$this->setOpt(CURLOPT_COOKIEJAR, $cookie_jar);
474+
return $this->setOpt(CURLOPT_COOKIEJAR, $cookie_jar);
471475
}
472476

473477
/**

0 commit comments

Comments
 (0)