Uploading too many attachments yields an incorrect error type
authorAlexander Ebert <ebert@woltlab.com>
Mon, 22 Feb 2021 23:05:56 +0000 (00:05 +0100)
committerAlexander Ebert <ebert@woltlab.com>
Mon, 22 Feb 2021 23:05:56 +0000 (00:05 +0100)
wcfsetup/install/files/lib/data/attachment/AttachmentAction.class.php

index f6155c1042d4ae0c4991a122304c545097bc0e36..d7b5b08884fa95cf745d733aeba050c884d432b3 100644 (file)
@@ -115,7 +115,7 @@ class AttachmentAction extends AbstractDatabaseObjectAction implements ISortable
                $handler = new AttachmentHandler($this->parameters['objectType'], intval($this->parameters['objectID']), $this->parameters['tmpHash']);
                /** @noinspection PhpUndefinedMethodInspection */
                if ($handler->count() + count($this->parameters['__files']->getFiles()) > $processor->getMaxCount()) {
-                       throw new UserInputException('files', 'exceededQuota', [
+                       throw new UserInputException('files', 'reachedLimit', [
                                'current' => $handler->count(),
                                'quota' => $processor->getMaxCount()
                        ]);