From f5490119ca26160f954a505dcdefb8471806f08e Mon Sep 17 00:00:00 2001 From: Christian Mette Date: Wed, 16 Aug 2023 08:06:43 +0200 Subject: [PATCH 1/2] fixes https://github.com/pdir/contao-survey/issues/42 --- src/Resources/contao/classes/SurveyPINTAN.php | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/Resources/contao/classes/SurveyPINTAN.php b/src/Resources/contao/classes/SurveyPINTAN.php index 5b7107c..029e860 100644 --- a/src/Resources/contao/classes/SurveyPINTAN.php +++ b/src/Resources/contao/classes/SurveyPINTAN.php @@ -41,7 +41,7 @@ class SurveyPINTAN extends Backend { protected $blnSave = true; - public function exportTAN(DataContainer $dc) + public function exportTAN(DataContainer $dc): string { if ('exporttan' !== Input::get('key')) { return ''; @@ -49,8 +49,7 @@ public function exportTAN(DataContainer $dc) if ('tl_survey_pin_tan' === Input::get('table')) { $this->redirect(Backend::addToUrl('table=tl_survey', true, ['table'])); - - return; + return ''; } $this->loadLanguageFile('tl_survey_pin_tan'); @@ -223,7 +222,7 @@ public function createTAN(DataContainer $dc) // Create import form if ('tl_export_survey_pin_tan' === Input::post('FORM_SUBMIT') && $this->blnSave) { - $nrOfTAN = $this->Template->nrOfTAN->value; + $nrOfTAN = (int)$this->Template->nrOfTAN->value; $this->import('\Hschottm\SurveyBundle\Survey', 'svy'); for ($i = 0; $i < ceil($nrOfTAN); ++$i) { From 25e4340a0dc28e517c6848dbbc376cf7db2184c2 Mon Sep 17 00:00:00 2001 From: Christian Mette Date: Wed, 16 Aug 2023 08:07:22 +0200 Subject: [PATCH 2/2] fixes https://github.com/pdir/contao-survey/issues/42 --- src/Resources/contao/classes/SurveyPINTAN.php | 1 - 1 file changed, 1 deletion(-) diff --git a/src/Resources/contao/classes/SurveyPINTAN.php b/src/Resources/contao/classes/SurveyPINTAN.php index 029e860..d2491e1 100644 --- a/src/Resources/contao/classes/SurveyPINTAN.php +++ b/src/Resources/contao/classes/SurveyPINTAN.php @@ -49,7 +49,6 @@ public function exportTAN(DataContainer $dc): string if ('tl_survey_pin_tan' === Input::get('table')) { $this->redirect(Backend::addToUrl('table=tl_survey', true, ['table'])); - return ''; } $this->loadLanguageFile('tl_survey_pin_tan');