Skip to content

Commit 157a9af

Browse files
committed
make the cs-bundle optional, for non-composer installations
1 parent 42a0999 commit 157a9af

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/Http/CurlDispatcher.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,11 @@ public function dispatch(Url $url)
9191
}
9292

9393
//Other sites needs a certificate
94-
if ($response->getStatusCode() === 0 && strpos($response->getError(), 'SSL') !== false) {
94+
if (
95+
class_exists('Composer\\CaBundle\\CaBundle')
96+
&& $response->getStatusCode() === 0
97+
&& strpos($response->getError(), 'SSL') !== false
98+
) {
9599
$options[CURLOPT_SSL_VERIFYHOST] = 2;
96100
$options[CURLOPT_SSL_VERIFYPEER] = true;
97101
$options[CURLOPT_CAINFO] = CaBundle::getSystemCaRootBundlePath();

0 commit comments

Comments
 (0)