Commit b5903a08 authored by Marc Bastian Heinrichs's avatar Marc Bastian Heinrichs Committed by Anja Leichsenring
Browse files

[BUGFIX] Make single errors from FileSizeValidator translatable

Hand over the original error code from the validator instead of
setting a new one.

Resolves: #87042
Releases: master, 9.5
Change-Id: Ifbb023423934832fdea2550aa7d3a55507616e73
Reviewed-on: https://review.typo3.org/58996


Tested-by: default avatarTYPO3com <noreply@typo3.com>
Reviewed-by: Christian Kuhn's avatarChristian Kuhn <lolli@schwarzbu.ch>
Tested-by: Christian Kuhn's avatarChristian Kuhn <lolli@schwarzbu.ch>
Reviewed-by: Anja Leichsenring's avatarAnja Leichsenring <aleichsenring@ab-softlab.de>
Tested-by: Anja Leichsenring's avatarAnja Leichsenring <aleichsenring@ab-softlab.de>
parent ad4f700d
......@@ -17,6 +17,7 @@ ignoreFiles+="sysext/core/Tests/Acceptance/Support/_generated/BackendTesterActio
ignoreFiles+="sysext/core/Tests/Acceptance/Support/_generated/InstallTesterActions.php"
# a exception in here throws up an code from a previous exception
ignoreFiles+="sysext/extbase/Classes/Core/Bootstrap.php"
ignoreFiles+="sysext/form/Classes/Mvc/Property/TypeConverter/UploadedFileReferenceConverter.php"
foundNewFile=0
oldFilename=""
......@@ -84,4 +85,4 @@ do
fi
done || exit 1
exit 0
\ No newline at end of file
exit 0
......@@ -209,7 +209,7 @@ class UploadedFileReferenceConverter extends AbstractTypeConverter
$validationResult = $validator->validate($uploadedFile);
if ($validationResult->hasErrors()) {
$uploadedFile->getStorage()->deleteFile($uploadedFile);
throw new TypeConverterException($validationResult->getErrors()[0]->getMessage(), 1471708999);
throw new TypeConverterException($validationResult->getErrors()[0]->getMessage(), $validationResult->getErrors()[0]->getCode());
}
}
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment