Skip to content

Commit 6f3874f

Browse files
authored
fix: disable secure-http config option for unsafe configured PECL website (#257)
1 parent c3fea31 commit 6f3874f

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

src/Package/PHP/Convey/Command/Pecl.php

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -103,13 +103,11 @@ protected function fetch($target)
103103
$config = new Config();
104104
$config->merge([
105105
'config' => [
106-
'secure-http' => WebsiteFactory::isTestServer() ? false : true,
106+
'secure-http' => !WebsiteFactory::getWebsite()->isUnsafe(),
107107
],
108108
]);
109109
$downloader = new PECLDownloader($this->io, $config);
110-
if ($downloader !== null) {
111-
$downloader->download($package, $target);
112-
}
110+
$downloader->download($package, $target);
113111

114112
unset($package, $downloader);
115113
}

0 commit comments

Comments
 (0)