From 6ca6f803421cef7f46d957e5da81a4c518909004 Mon Sep 17 00:00:00 2001 From: Sebastian Wagner <sebastian.wagner@tritum.de> Date: Sat, 5 Mar 2016 18:54:59 +0100 Subject: [PATCH] [BUGFIX] EXT:form - prevent duplicate call to getRecordAsJson We prevent getRecordAsJson to be called twice when rendering element. Fix annotations of for return values of JSON elements Resolves: #74331 Change-Id: Ib4826ebeee33f91c18db230d1aba2ffe39070ea1 Reviewed-on: https://review.typo3.org/47112 Reviewed-by: Daniel Goerz <ervaude@gmail.com> Tested-by: Daniel Goerz <ervaude@gmail.com> Reviewed-by: Christian Kuhn <lolli@schwarzbu.ch> Tested-by: Christian Kuhn <lolli@schwarzbu.ch> --- .../sysext/form/Classes/Utility/TypoScriptToJsonConverter.php | 2 +- .../form/Classes/View/Wizard/Element/FormWizardElement.php | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/typo3/sysext/form/Classes/Utility/TypoScriptToJsonConverter.php b/typo3/sysext/form/Classes/Utility/TypoScriptToJsonConverter.php index 32879d186503..0c07ab26ff8f 100644 --- a/typo3/sysext/form/Classes/Utility/TypoScriptToJsonConverter.php +++ b/typo3/sysext/form/Classes/Utility/TypoScriptToJsonConverter.php @@ -64,7 +64,7 @@ class TypoScriptToJsonConverter * Convert TypoScript string to JSON * * @param array $typoscript TypoScript string containing all configuration for the form - * @return string The JSON for the form + * @return TYPO3\CMS\Form\Domain\Model\Json\FormJsonElement|false The JSON for the form */ public function convert(array $typoscript) { diff --git a/typo3/sysext/form/Classes/View/Wizard/Element/FormWizardElement.php b/typo3/sysext/form/Classes/View/Wizard/Element/FormWizardElement.php index ceafa39215f3..71bbb088fcbe 100644 --- a/typo3/sysext/form/Classes/View/Wizard/Element/FormWizardElement.php +++ b/typo3/sysext/form/Classes/View/Wizard/Element/FormWizardElement.php @@ -81,7 +81,7 @@ class FormWizardElement extends AbstractFormElement * Read and convert the content record to JSON * * @see \TYPO3\CMS\Form\Domain\Repository\ContentRepository::getRecordAsJson - * @return string The JSON object if record exists, FALSE if not + * @return TYPO3\CMS\Form\Domain\Model\Json\FormJsonElement|false The JSON object if record exists, FALSE if not */ protected function getRecordAsJson() { @@ -143,7 +143,6 @@ class FormWizardElement extends AbstractFormElement */ protected function resultAddWizardSettingsJson(array $settings) { - $this->getRecordAsJson(); $recordJson = $this->getRecordAsJson(); $settings['Configuration'] = $recordJson; $settings['ajaxUrl'] = $this->getAjaxUrl(); -- GitLab