Merge pull request #21663 from nextcloud/backport/21662/stable19

[stable19] Fix static method call for s3 bucket compat check
This commit is contained in:
Christoph Wurst 2020-07-03 16:10:38 +02:00 committed by GitHub
commit 6296dbeb55
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -110,7 +110,7 @@ trait S3ConnectionTrait {
}
$this->connection = new S3Client($options);
if (!$this->connection->isBucketDnsCompatible($this->bucket)) {
if (!$this->connection::isBucketDnsCompatible($this->bucket)) {
$logger = \OC::$server->getLogger();
$logger->debug('Bucket "' . $this->bucket . '" This bucket name is not dns compatible, it may contain invalid characters.',
['app' => 'objectstore']);
@ -120,7 +120,7 @@ trait S3ConnectionTrait {
$logger = \OC::$server->getLogger();
try {
$logger->info('Bucket "' . $this->bucket . '" does not exist - creating it.', ['app' => 'objectstore']);
if (!$this->connection->isBucketDnsCompatible($this->bucket)) {
if (!$this->connection::isBucketDnsCompatible($this->bucket)) {
throw new \Exception("The bucket will not be created because the name is not dns compatible, please correct it: " . $this->bucket);
}
$this->connection->createBucket(['Bucket' => $this->bucket]);