pdir/contao-survey

Warning: Declaration of Hschottm\SurveyBundle\SurveyQuestionMultiplechoice::exportDataToExcel(&$exporter, $sheet, &$row) should be compatible with Hschottm\SurveyBundle\SurveyQuestion::exportDataToExcel($sheet, &$row)

Closed this issue · 2 comments

Bug description

ErrorException:
Warning: Declaration of Hschottm\SurveyBundle\SurveyQuestionMultiplechoice::exportDataToExcel(&$exporter, $sheet, &$row) should be compatible with Hschottm\SurveyBundle\SurveyQuestion::exportDataToExcel($sheet, &$row)

  at vendor/pdir/contao-survey/src/Resources/contao/classes/SurveyQuestionMultiplechoice.php:67
  at Symfony\Component\ErrorHandler\ErrorHandler->handleError(2, 'Declaration of Hschottm\\SurveyBundle\\SurveyQuestionMultiplechoice::exportDataToExcel(&$exporter, $sheet, &$row) should be compatible with Hschottm\\SurveyBundle\\SurveyQuestion::exportDataToExcel($sheet, &$row)', '/home/akroiide/domains/akroii.de/public_html/survey/vendor/pdir/contao-survey/src/Resources/contao/classes/SurveyQuestionMultiplechoice.php', 67, array('class' => 'Hschottm\\SurveyBundle\\SurveyQuestionMultiplechoice', 'e' => 8183, 'file' => '/home/akroiide/domains/akroii.de/public_html/survey/vendor/composer/../pdir/contao-survey/src/Resources/contao/classes/SurveyQuestionMultiplechoice.php'))
     (vendor/pdir/contao-survey/src/Resources/contao/classes/SurveyQuestionMultiplechoice.php:21)
  at spl_autoload_call('Hschottm\\SurveyBundle\\SurveyQuestionMultiplechoice')
  at class_exists('Hschottm\\SurveyBundle\\SurveyQuestionMultiplechoice')
     (vendor/contao/core-bundle/src/Resources/contao/library/Contao/Controller.php:2176)
  at Contao\Controller->classFileExists('Hschottm\\SurveyBundle\\SurveyQuestionMultiplechoice')
     (vendor/pdir/contao-survey/src/Resources/contao/classes/SurveyResultDetails.php:94)
  at Hschottm\SurveyBundle\SurveyResultDetails->showCumulated(object(DC_Table))
     (vendor/contao/core-bundle/src/Resources/contao/classes/Backend.php:441)
  at Contao\Backend->getBackendModule('survey', null)
     (vendor/contao/core-bundle/src/Resources/contao/controllers/BackendMain.php:167)
  at Contao\BackendMain->run()
     (vendor/contao/core-bundle/src/Controller/BackendController.php:48)
  at Contao\CoreBundle\Controller\BackendController->mainAction()
     (vendor/symfony/http-kernel/HttpKernel.php:158)
  at Symfony\Component\HttpKernel\HttpKernel->handleRaw(object(Request), 1)
     (vendor/symfony/http-kernel/HttpKernel.php:80)
  at Symfony\Component\HttpKernel\HttpKernel->handle(object(Request), 1, true)
     (vendor/symfony/http-kernel/Kernel.php:201)
  at Symfony\Component\HttpKernel\Kernel->handle(object(Request))
     (web/index.php:31)     

Steps to reproduce

  1. Create a survey
  2. Fill out all necessary data to get a survey in frontend
  3. go back to backend and turn debug mode on
  4. choose one survey and click on statistics-icon
  5. earn error

Expected behavior

Statistics are visible without symphony warning

Environment

Contao 4.9.12
Survey 3.2.8

Agreed. Could you please replace the method in vendor/pdir/contao-survey/src/Resources/contao/classes/SurveyQuestion.php to the following:

public function exportDataToExcel(&$exporter, $sheet, &$row)

Thanks!

fixed in version 3.2.10