]> source.dussan.org Git - nextcloud-server.git/commitdiff
Fix static method call for s3 bucket compat check 21662/head
authorChristoph Wurst <christoph@winzerhof-wurst.at>
Fri, 3 Jul 2020 07:02:58 +0000 (09:02 +0200)
committerChristoph Wurst <christoph@winzerhof-wurst.at>
Fri, 3 Jul 2020 07:02:58 +0000 (09:02 +0200)
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
lib/private/Files/ObjectStore/S3ConnectionTrait.php

index 16a48ee82a02ae5b35f2300c569b5aeeb3720015..b96a11833cda09ba269fd8bafc7cb38df38f210f 100644 (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]);