diff options
author | Thomas Müller <thomas.mueller@tmit.eu> | 2016-01-13 10:29:36 +0100 |
---|---|---|
committer | Thomas Müller <thomas.mueller@tmit.eu> | 2016-01-13 10:29:36 +0100 |
commit | 4129480eb0a91bf53785ad38c6527def3ae0f1f8 (patch) | |
tree | 508ea1bdc31250e7c2ea39e491f56d569ecb9035 /lib/private/http/client | |
parent | e22186d234dbe359b8fc9035b509a62112ffbc9d (diff) | |
parent | 28049b510b4500cd56625d5931a1c431f09253c2 (diff) | |
download | nextcloud-server-4129480eb0a91bf53785ad38c6527def3ae0f1f8.tar.gz nextcloud-server-4129480eb0a91bf53785ad38c6527def3ae0f1f8.zip |
Merge pull request #21671 from owncloud/fix-setup-on-master
Use legacy method when ownCloud is not yet installed
Diffstat (limited to 'lib/private/http/client')
-rw-r--r-- | lib/private/http/client/client.php | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/lib/private/http/client/client.php b/lib/private/http/client/client.php index 8cadeda0efd..bd9e82ddae7 100644 --- a/lib/private/http/client/client.php +++ b/lib/private/http/client/client.php @@ -62,7 +62,14 @@ class Client implements IClient { if ($this->certificateManager->listCertificates() !== []) { $this->client->setDefaultOption('verify', $this->certificateManager->getAbsoluteBundlePath()); } else { - $this->client->setDefaultOption('verify', $this->certificateManager->getAbsoluteBundlePath(null)); + // If the instance is not yet setup we need to use the static path as + // $this->certificateManager->getAbsoluteBundlePath() tries to instantiiate + // a view + if($this->config->getSystemValue('installed', false)) { + $this->client->setDefaultOption('verify', $this->certificateManager->getAbsoluteBundlePath(null)); + } else { + $this->client->setDefaultOption('verify', \OC::$SERVERROOT . '/resources/config/ca-bundle.crt'); + } } $this->client->setDefaultOption('headers/User-Agent', 'ownCloud Server Crawler'); |