don't set `null` as a bundle path

Signed-off-by: Robin Appelman <robin@icewind.nl>
pull/33378/head
Robin Appelman 2022-07-27 12:58:07 +07:00
parent 6206b312b2
commit 61fdd91dcf
No known key found for this signature in database
GPG Key ID: 42B69D8A64526EFB
1 changed files with 6 additions and 3 deletions

@ -69,11 +69,14 @@ trait S3ObjectTrait {
'http' => [
'protocol_version' => $request->getProtocolVersion(),
'header' => $headers,
],
'ssl' => [
'cafile' => $this->getCertificateBundlePath()
]
];
$bundle = $this->getCertificateBundlePath();
if ($bundle) {
$opts['ssl'] = [
'cafile' => $bundle
];
}
if ($this->getProxy()) {
$opts['http']['proxy'] = $this->getProxy();