diff --git a/Classes/Command/S3CommandController.php b/Classes/Command/S3CommandController.php index 9573314..4039d73 100644 --- a/Classes/Command/S3CommandController.php +++ b/Classes/Command/S3CommandController.php @@ -111,7 +111,6 @@ public function listBucketsCommand(): void } catch (\Exception $e) { $this->outputLine($e->getMessage()); $this->quit(1); - exit; } if (count($result['Buckets']) === 0) { @@ -144,7 +143,6 @@ public function flushBucketCommand(string $bucket): void } catch (\Exception $e) { $this->outputLine($e->getMessage()); $this->quit(1); - exit; } $promise->wait(); $this->outputLine('Successfully flushed bucket %s.', [$bucket]); diff --git a/Classes/S3Target.php b/Classes/S3Target.php index 7b781c6..47831b2 100644 --- a/Classes/S3Target.php +++ b/Classes/S3Target.php @@ -229,7 +229,7 @@ public function getKeyPrefix(): string */ public function getAcl() { - return isset($this->acl) ? $this->acl : $this->defaultAcl; + return $this->acl ?? $this->defaultAcl; } /** @@ -514,7 +514,7 @@ protected function publishFile($sourceStream, string $relativeTargetPathAndFilen ]; try { - $this->s3Client->upload($this->bucketName, $objectName, $sourceStream, $this->getAcl() ? $this->getAcl() : null, $options); + $this->s3Client->upload($this->bucketName, $objectName, $sourceStream, $this->getAcl() ?: null, $options); $this->systemLogger->debug(sprintf('Successfully published resource as object "%s" in bucket "%s" with SHA1 hash "%s"', $objectName, $this->bucketName, $metaData->getSha1() ?: 'unknown')); } catch (\Exception $e) { $this->systemLogger->debug(sprintf('Failed publishing resource as object "%s" in bucket "%s" with SHA1 hash "%s": %s', $objectName, $this->bucketName, $metaData->getSha1() ?: 'unknown', $e->getMessage()));