[BUGFIX] Fix namespace of validation error in form 11/57211/3
authorJustus Moroni <developer@leonmrni.com>
Wed, 13 Jun 2018 18:42:31 +0000 (20:42 +0200)
committerRalf Zimmermann <ralf.zimmermann@tritum.de>
Wed, 13 Jun 2018 18:53:06 +0000 (20:53 +0200)
The FormElementHooks now uses the correct namespace
for the generated error.

The TranslateElementErrorViewHelper requires the submitted
error to be an instance of TYPO3\CMS\Extbase\Validation\Error.
The error was an instance of TYPO3\CMS\Extbase\Error\Error.
As the instance was wrong, an exception was thrown.

Resolves: #85255
Releases: master, 8.7
Change-Id: I6ccce5fb6370d2bf34f494141d73cc602eb923ce
Reviewed-on: https://review.typo3.org/57211
Reviewed-by: Ralf Zimmermann <ralf.zimmermann@tritum.de>
Tested-by: Ralf Zimmermann <ralf.zimmermann@tritum.de>
typo3/sysext/form/Classes/Hooks/FormElementHooks.php

index 32fdaef..52ec64d 100644 (file)
@@ -15,8 +15,8 @@ namespace TYPO3\CMS\Form\Hooks;
  */
 
 use TYPO3\CMS\Core\Utility\GeneralUtility;
-use TYPO3\CMS\Extbase\Error\Error;
 use TYPO3\CMS\Extbase\Object\ObjectManager;
+use TYPO3\CMS\Extbase\Validation\Error;
 use TYPO3\CMS\Form\Domain\Model\Renderable\RenderableInterface;
 use TYPO3\CMS\Form\Domain\Model\Renderable\RootRenderableInterface;
 use TYPO3\CMS\Form\Domain\Runtime\FormRuntime;