File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -298,14 +298,14 @@ public function error($callback)
298
298
*/
299
299
public function exec ($ ch = null )
300
300
{
301
+ $ this ->responseCookies = array ();
301
302
if (!($ ch === null )) {
302
303
$ this ->rawResponse = curl_multi_getcontent ($ ch );
303
304
} else {
304
305
$ this ->call ($ this ->beforeSendFunction );
305
306
$ this ->rawResponse = curl_exec ($ this ->curl );
306
307
$ this ->curlErrorCode = curl_errno ($ this ->curl );
307
308
}
308
- $ this ->responseCookies = array ();
309
309
$ this ->curlErrorMessage = curl_error ($ this ->curl );
310
310
$ this ->curlError = !($ this ->curlErrorCode === 0 );
311
311
$ this ->httpStatusCode = curl_getinfo ($ this ->curl , CURLINFO_HTTP_CODE );
@@ -544,13 +544,13 @@ public function setCookie($key, $value)
544
544
}
545
545
546
546
/**
547
- * get Cookie of Response
547
+ * get Cookie of Response, if Key is set. Otherwise return NULL
548
548
*
549
549
* @access public
550
550
* @param $key
551
551
*/
552
552
public function getResponseCookie ($ key ) {
553
- return $ this ->responseCookies [$ key ];
553
+ return ( isset ( $ this ->responseCookies [$ key ]))? $ this -> responseCookies [ $ key ]: NULL ;
554
554
}
555
555
556
556
/**
You can’t perform that action at this time.
0 commit comments