Skip to content

Commit

Permalink
Merge pull request #49 from pdir/fix/error_whilst_creating_TANs
Browse files Browse the repository at this point in the history
fixes the error whilst creating TANs
  • Loading branch information
MDevster authored Aug 16, 2023
2 parents ad087db + 25e4340 commit 8791172
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/Resources/contao/classes/SurveyPINTAN.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,16 +41,14 @@ class SurveyPINTAN extends Backend
{
protected $blnSave = true;

public function exportTAN(DataContainer $dc)
public function exportTAN(DataContainer $dc): string
{
if ('exporttan' !== Input::get('key')) {
return '';
}

if ('tl_survey_pin_tan' === Input::get('table')) {
$this->redirect(Backend::addToUrl('table=tl_survey', true, ['table']));

return;
}

$this->loadLanguageFile('tl_survey_pin_tan');
Expand Down Expand Up @@ -223,7 +221,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) {
Expand Down

0 comments on commit 8791172

Please sign in to comment.