PHP notice

Undefined property: SurveyRuntimeHelper::$preview

/home/sondages.pro/htdocs/limesurvey_GIT/testing/develop/application/helpers/SurveyRuntimeHelper.php(1458)

1446             Yii::app()->twigRenderer->renderTemplateFromFile("layout_clearall.twig", array('aSurveyInfo'=>$this->aSurveyInfo), false);
1447         }
1448     }
1449 
1450     /**
1451      * NOTE: right now, captcha works ONLY if reloaded... need to be debug.
1452      * NOTE: I bet we have the same problem on 2.6x.x
1453      * NOTE: when token + captcha: works fine
1454      */
1455     private function showTokenOrCaptchaFormsIfNeeded()
1456     {
1457         $this->iSurveyid   = $this->aSurveyInfo['sid'];
1458         $preview           = $this->preview;
1459 
1460         // Template settings
1461         $oTemplate         = $this->oTemplate;
1462         $this->sTemplateViewPath = $oTemplate->viewPath;
1463 
1464 
1465         // TODO: find where they are defined before this call
1466         global $clienttoken;
1467         global $tokensexist;
1468         /**
1469         * This method has multiple outcomes that virtually do the same thing
1470         * Possible scenarios/subscenarios are =>

Stack Trace

#0
+
 /home/sondages.pro/htdocs/limesurvey_GIT/testing/develop/application/helpers/SurveyRuntimeHelper.php(98): SurveyRuntimeHelper->showTokenOrCaptchaFormsIfNeeded()
093         extract($args);
094 
095         ///////////////////////////////////////////////////////////
096         // 1: We check if token and/or captcha form shouls be shown
097         if (!isset($_SESSION[$this->LEMsessid]['step'])){
098             $this->showTokenOrCaptchaFormsIfNeeded();
099         }
100 
101         if ( !$this->previewgrp && !$this->previewquestion){
102             $this->initMove();                                                  // main methods to init session, LEM, moves, errors, etc
103             $this->checkQuotas();                                               // check quotas (then the process will stop here)
#1
+
 /home/sondages.pro/htdocs/limesurvey_GIT/testing/develop/application/controllers/survey/index.php(580): SurveyRuntimeHelper->run("65265", array("surveyid" => "65265", "thissurvey" => array("htmlemail" => "Y", "format" => "A", "template" => "default", "language" => "fr", ...), "thisstep" => null, "tokensexist" => 0, ...))
575         //Send local variables to the appropriate survey type
576         unset($redata);
577         $redata = compact(array_keys(get_defined_vars()));
578         Yii::import('application.helpers.SurveyRuntimeHelper');
579         $tmp = new SurveyRuntimeHelper();
580         $tmp->run($surveyid,$redata);
581 
582         if (App()->request->getPost('saveall') || isset($flashmessage)){
583             App()->clientScript->registerScript("saveflashmessage","alert('".gT("Your responses were successfully saved.","js")."');",CClientScript::POS_READY);
584         }
585     }
#2
+
 /home/sondages.pro/htdocs/limesurvey_GIT/testing/develop/application/controllers/survey/index.php(21): index->action()
16     public $oTemplate;
17 
18     public function run()
19     {
20         useFirebug();
21         $this->action();
22     }
23 
24     function action()
25     {
26         global $surveyid;
2017-07-07 17:14:35 Apache/2.2.22 (Debian) Yii Framework/1.1.18