Commit 90a6f54d authored by Chenu Denis's avatar Chenu Denis

[fix] Don't break with invalid surveyColumnsInformation api

parent d39f35d5
......@@ -517,14 +517,12 @@ class ResponseExtended extends LSActiveRecord
* @inheritdoc adding string, by default current event
* @param string
* @param string \CLogger const
* @param string $logDetail, if not set or set to global : get current event name (if exist)
* @param string $logDetail, default to global
*/
public function log($message, $level = \CLogger::LEVEL_TRACE,$logDetail = "global")
{
if($logDetail== "global" && $this->getEvent()) {
$logDetail = $this->getEvent()->getEventName();
}
Yii::log($message, $level,'plugins.responseListAndManage.ResponseExtended.'.$logDetail);
Yii::log('[plugins.responseListAndManage.ResponseExtended.'.$logDetail.'] '.$message, $level,'vardump');
}
/**
......@@ -588,8 +586,8 @@ class ResponseExtended extends LSActiveRecord
)
);
/* Find numeric columns */
if(empty(\getQuestionInformation\helpers\surveyColumnsInformation::apiversion)) {
$this->log("You need getQuestionInformation\helpers\surveyColumnsInformation with api version 1 at minimum for nupmbers_only question",'warning');
if(!defined("\getQuestionInformation\helpers\surveyColumnsInformation::apiversion")) {
$this->log("You need getQuestionInformation\helpers\surveyColumnsInformation with api version 1 at minimum for numbers_only question",'warning','getSort');
}else {
$surveyColumnsInformation = new \getQuestionInformation\helpers\surveyColumnsInformation(self::$sid,App()->getLanguage());
$aQuestionsTypes = $surveyColumnsInformation->allQuestionsType();
......
......@@ -5,7 +5,7 @@
* @author Denis Chenu <denis@sondages.pro>
* @copyright 2018 Denis Chenu <http://www.sondages.pro>
* @license GPL v3
* @version 1.10.0
* @version 1.10.1
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE as published by
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment