Skip to content

Commit 07734db

Browse files
committed
:octocat:
1 parent 221a446 commit 07734db

File tree

1 file changed

+5
-8
lines changed

1 file changed

+5
-8
lines changed

src/HTTPOptionsTrait.php

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ trait HTTPOptionsTrait{
1717
/**
1818
* @var string
1919
*/
20-
public $user_agent = 'chillerlanHttpInterface/2.0 +https://github.com/chillerlan/php-httpinterface';
20+
protected $user_agent = 'chillerlanHttpInterface/2.0 +https://github.com/chillerlan/php-httpinterface';
2121

2222
/**
2323
* options for each curl instance
@@ -27,7 +27,7 @@ trait HTTPOptionsTrait{
2727
*
2828
* @var array
2929
*/
30-
public $curl_options = [];
30+
protected $curl_options = [];
3131

3232
/**
3333
* CA Root Certificates for use with CURL/SSL (if not configured in php.ini)
@@ -36,7 +36,7 @@ trait HTTPOptionsTrait{
3636
* @link https://curl.haxx.se/ca/cacert.pem
3737
* @link https://raw.githubusercontent.com/bagder/ca-bundle/master/ca-bundle.crt
3838
*/
39-
public $ca_info = null;
39+
protected $ca_info = null;
4040

4141
/**
4242
* HTTPOptionsTrait constructor
@@ -50,18 +50,15 @@ protected function HTTPOptionsTrait():void{
5050
}
5151

5252
// we cannot verify a peer against a non-existent ca file, so turn it off in that case
53-
if(!$this->ca_info || !is_file($this->ca_info)
53+
/* if(!$this->ca_info || !is_file($this->ca_info)
5454
|| (isset($this->curl_options[CURLOPT_CAINFO]) && !is_file($this->curl_options[CURLOPT_CAINFO]))){
5555
5656
$this->curl_options += [
5757
CURLOPT_SSL_VERIFYPEER => false,
5858
CURLOPT_CAINFO => null,
5959
];
60-
}
60+
}*/
6161

62-
if(!is_string($this->user_agent) || empty(trim($this->user_agent))){
63-
throw new ClientException('invalid user agent');
64-
}
6562
}
6663

6764
}

0 commit comments

Comments
 (0)