Skip to content
This repository was archived by the owner on Jan 23, 2019. It is now read-only.

Commit ba425c1

Browse files
committed
bug fixed
1 parent bf189fd commit ba425c1

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

src/utils/Curl.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -323,8 +323,8 @@ public function downImage($imgUrl, $saveTo, $rename = '')
323323
return $imgFile;
324324
}
325325

326-
// set Referer
327-
$this->setReferer('http://www.baidu.com');
326+
// set Referrer
327+
$this->setReferrer('http://www.baidu.com');
328328

329329
$imgData = $this->request($imgUrl)->getResponseBody();
330330

@@ -808,12 +808,12 @@ public function setUserAgent($userAgent)
808808
}
809809

810810
/**
811-
* @param $referer
811+
* @param $referrer
812812
* @return $this
813813
*/
814-
public function setReferer($referer)
814+
public function setReferrer($referrer)
815815
{
816-
$this->_options[CURLOPT_REFERER] = $referer;
816+
$this->_options[CURLOPT_REFERER] = $referrer;
817817

818818
return $this;
819819
}
@@ -844,7 +844,7 @@ public function setUserAuth($user, $pwd, $authType = CURLAUTH_BASIC)
844844
public function setSSLAuth($pwd, $file, $authType = self::SSL_TYPE_CERT)
845845
{
846846
if ( $authType !== self::SSL_TYPE_CERT && $authType !== self::SSL_TYPE_KEY ) {
847-
throw new \InvalidArgumentException("The SSL auth type only allow: cert|key");
847+
throw new \InvalidArgumentException('The SSL auth type only allow: cert|key');
848848
}
849849

850850
if ( !file_exists($file) ) {

0 commit comments

Comments
 (0)