View Issue Details
| ID | Project | Category | View Status | Date Submitted | Last Update |
|---|---|---|---|---|---|
| 19277 | Bug reports | Import/Export | public | 2023-11-24 08:57 | 2024-11-19 18:14 |
| Reporter | DenisChenu | Assigned To | DenisChenu | ||
| Priority | none | Severity | minor | ||
| Status | closed | Resolution | fixed | ||
| Product Version | 6.3.x | ||||
| Summary | 19277: When export to CSV : multiple PHP error with debug and php8.1 | ||||
| Description | When try to export specific survey ;: there are multiple PHP Error and warning? Fixing one show another oe etc … (i stop at 3 currently) | ||||
| Steps To Reproduce | Steps to reproducePHP8.1 + debu=2 Expected resultDownload CSV file Actual resultPHP Error | ||||
| Tags | No tags attached. | ||||
| Attached Files | PHP error.html (23,868 bytes)
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"><head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>PHP error</title>
<style type="text/css">
/*<![CDATA[*/
html,body,div,span,applet,object,iframe,h1,h2,h3,h4,h5,h6,p,blockquote,pre,a,abbr,acronym,address,big,cite,code,del,dfn,em,font,img,ins,kbd,q,s,samp,small,strike,strong,sub,sup,tt,var,b,u,i,center,dl,dt,dd,ol,ul,li,fieldset,form,label,legend,table,caption,tbody,tfoot,thead,tr,th,td{border:0;outline:0;font-size:100%;vertical-align:baseline;background:transparent;margin:0;padding:0;}
body{line-height:1;}
ol,ul{list-style:none;}
blockquote,q{quotes:none;}
blockquote:before,blockquote:after,q:before,q:after{content:none;}
:focus{outline:0;}
ins{text-decoration:none;}
del{text-decoration:line-through;}
table{border-collapse:collapse;border-spacing:0;}
body {
font: normal 9pt "Verdana";
color: #000;
background: #fff;
}
h1 {
font: normal 18pt "Verdana";
color: #f00;
margin-bottom: .5em;
}
h2 {
font: normal 14pt "Verdana";
color: #800000;
margin-bottom: .5em;
}
h3 {
font: bold 11pt "Verdana";
}
pre {
font: normal 11pt Menlo, Consolas, "Lucida Console", Monospace;
}
pre span.error {
display: block;
background: #fce3e3;
}
pre span.ln {
color: #999;
padding-right: 0.5em;
border-right: 1px solid #ccc;
}
pre span.error-ln {
font-weight: bold;
}
.container {
margin: 1em 4em;
}
.version {
color: gray;
font-size: 8pt;
border-top: 1px solid #aaa;
padding-top: 1em;
margin-bottom: 1em;
}
.message {
color: #000;
padding: 1em;
font-size: 11pt;
background: #f3f3f3;
-webkit-border-radius: 10px;
-moz-border-radius: 10px;
border-radius: 10px;
margin-bottom: 1em;
line-height: 160%;
}
.source {
margin-bottom: 1em;
}
.code pre {
background-color: #ffe;
margin: 0.5em 0;
padding: 0.5em;
line-height: 125%;
border: 1px solid #eee;
}
.source .file {
margin-bottom: 1em;
font-weight: bold;
}
.traces {
margin: 2em 0;
}
.trace {
margin: 0.5em 0;
padding: 0.5em;
}
.trace.app {
border: 1px dashed #c00;
}
.trace .number {
text-align: right;
width: 2em;
padding: 0.5em;
}
.trace .content {
padding: 0.5em;
}
.trace .plus,
.trace .minus {
display:inline;
vertical-align:middle;
text-align:center;
border:1px solid #000;
color:#000;
font-size:10px;
line-height:10px;
margin:0;
padding:0 1px;
width:10px;
height:10px;
}
.trace.collapsed .minus,
.trace.expanded .plus,
.trace.collapsed pre {
display: none;
}
.trace-file {
cursor: pointer;
padding: 0.2em;
}
.trace-file:hover {
background: #f0ffff;
}
/*]]>*/
</style>
</head>
<body>
<div class="container">
<h1>PHP error</h1>
<p class="message">
trim(): Passing null to parameter #1 ($string) of type string is deprecated </p>
<div class="source">
<p class="file">/media/shnoulle/data/webdev/master/vendor/yiisoft/yii/framework/db/CDbCommand.php(1101)</p>
<div class="code"><pre><span class="ln">1089</span> * </pre>
<span class="ln">1090</span> *
<span class="ln">1091</span> * @return static the command object itself
<span class="ln">1092</span> * @since 1.1.6
<span class="ln">1093</span> */
<span class="ln">1094</span> public function order($columns)
<span class="ln">1095</span> {
<span class="ln">1096</span> if(is_string($columns) && strpos($columns,'(')!==false)
<span class="ln">1097</span> $this->_query['order']=$columns;
<span class="ln">1098</span> else
<span class="ln">1099</span> {
<span class="ln">1100</span> if(!is_array($columns))
<span class="error"><span class="ln error-ln">1101</span> $columns=preg_split('/\s*,\s*/',trim($columns),-1,PREG_SPLIT_NO_EMPTY);
</span><span class="ln">1102</span> foreach($columns as $i=>$column)
<span class="ln">1103</span> {
<span class="ln">1104</span> if(is_object($column))
<span class="ln">1105</span> $columns[$i]=(string)$column;
<span class="ln">1106</span> elseif(strpos($column,'(')===false)
<span class="ln">1107</span> {
<span class="ln">1108</span> if(preg_match('/^(.*?)\s+(asc|desc)$/i',$column,$matches))
<span class="ln">1109</span> $columns[$i]=$this->_connection->quoteColumnName($matches[1]).' '.strtoupper($matches[2]);
<span class="ln">1110</span> else
<span class="ln">1111</span> $columns[$i]=$this->_connection->quoteColumnName($column);
<span class="ln">1112</span> }
<span class="ln">1113</span> }
</pre></div> </div>
<div class="traces">
<h2>Stack Trace</h2>
<table style="width:100%;">
<tbody><tr class="trace core collapsed">
<td class="number">
#0 </td>
<td class="content">
<div class="trace-file">
<div class="plus">+</div>
<div class="minus">–</div>
/media/shnoulle/data/webdev/master/vendor/yiisoft/yii/framework/db/CDbCommand.php(1101): <strong>trim</strong>(null) </div>
<div class="code"><pre><span class="ln">1096</span> if(is_string($columns) && strpos($columns,'(')!==false)
<span class="ln">1097</span> $this->_query['order']=$columns;
<span class="ln">1098</span> else
<span class="ln">1099</span> {
<span class="ln">1100</span> if(!is_array($columns))
<span class="error"><span class="ln error-ln">1101</span> $columns=preg_split('/\s*,\s*/',trim($columns),-1,PREG_SPLIT_NO_EMPTY);
</span><span class="ln">1102</span> foreach($columns as $i=>$column)
<span class="ln">1103</span> {
<span class="ln">1104</span> if(is_object($column))
<span class="ln">1105</span> $columns[$i]=(string)$column;
<span class="ln">1106</span> elseif(strpos($column,'(')===false)
</pre></div> </td>
</tr>
<tr class="trace core collapsed">
<td class="number">
#1 </td>
<td class="content">
<div class="trace-file">
<div class="plus">+</div>
<div class="minus">–</div>
/media/shnoulle/data/webdev/master/vendor/yiisoft/yii/framework/db/CDbCommand.php(1137): <strong>CDbCommand</strong>-><strong>order</strong>(null) </div>
<div class="code"><pre><span class="ln">1132</span> * on how to specify this parameter.
<span class="ln">1133</span> * @since 1.1.6
<span class="ln">1134</span> */
<span class="ln">1135</span> public function setOrder($value)
<span class="ln">1136</span> {
<span class="error"><span class="ln error-ln">1137</span> $this->order($value);
</span><span class="ln">1138</span> }
<span class="ln">1139</span>
<span class="ln">1140</span> /**
<span class="ln">1141</span> * Sets the LIMIT part of the query.
<span class="ln">1142</span> * @param integer $limit the limit
</pre></div> </td>
</tr>
<tr class="trace core collapsed">
<td class="number">
#2 </td>
<td class="content">
<div class="trace-file">
<div class="plus">+</div>
<div class="minus">–</div>
/media/shnoulle/data/webdev/master/vendor/yiisoft/yii/framework/base/CComponent.php(152): <strong>CDbCommand</strong>-><strong>setOrder</strong>(null) </div>
<div class="code"><pre><span class="ln">147</span> */
<span class="ln">148</span> public function __set($name,$value)
<span class="ln">149</span> {
<span class="ln">150</span> $setter='set'.$name;
<span class="ln">151</span> if(method_exists($this,$setter))
<span class="error"><span class="ln error-ln">152</span> return $this->$setter($value);
</span><span class="ln">153</span> elseif(strncasecmp($name,'on',2)===0 && method_exists($this,$name))
<span class="ln">154</span> {
<span class="ln">155</span> // duplicating getEventHandlers() here for performance
<span class="ln">156</span> $name=strtolower($name);
<span class="ln">157</span> if(!isset($this->_e[$name]))
</pre></div> </td>
</tr>
<tr class="trace app expanded">
<td class="number">
#3 </td>
<td class="content">
<div class="trace-file">
<div class="plus">+</div>
<div class="minus">–</div>
/media/shnoulle/data/webdev/master/application/helpers/admin/exportresults_helper.php(108): <strong>CComponent</strong>-><strong>__set</strong>("order", null) </div>
<div class="code"><pre><span class="ln">103</span> $surveyDao = new SurveyDao();
<span class="ln">104</span> $survey = $surveyDao->loadSurveyById($iSurveyId, $sLanguageCode, $oOptions);
<span class="ln">105</span> $writer->init($survey, $sLanguageCode, $oOptions);
<span class="ln">106</span>
<span class="ln">107</span> $countResponsesCommand = $surveyDao->loadSurveyResults($survey, $oOptions->responseMinRecord, $oOptions->responseMaxRecord, $sFilter, $oOptions->responseCompletionState, $oOptions->selectedColumns, $oOptions->aResponses);
<span class="error"><span class="ln error-ln">108</span> $countResponsesCommand->order = null;
</span><span class="ln">109</span> $countResponsesCommand->select('count(*)');
<span class="ln">110</span> $responseCount = $countResponsesCommand->queryScalar();
<span class="ln">111</span> $maxRows = 100;
<span class="ln">112</span> $maxPages = ceil($responseCount / $maxRows);
<span class="ln">113</span> for ($i = 0; $i < $maxPages; $i++) {
</pre></div> </td>
</tr>
<tr class="trace app expanded">
<td class="number">
#4 </td>
<td class="content">
<div class="trace-file">
<div class="plus">+</div>
<div class="minus">–</div>
/media/shnoulle/data/webdev/master/application/controllers/admin/Export.php(352): <strong>ExportSurveyResultsService</strong>-><strong>exportResponses</strong>(282267, "en", "csv", FormattingOptions, ...) </div>
<div class="code"><pre><span class="ln">347</span> } else {
<span class="ln">348</span> $sFilter = '';
<span class="ln">349</span> }
<span class="ln">350</span>
<span class="ln">351</span> viewHelper::disableHtmlLogging();
<span class="error"><span class="ln error-ln">352</span> $resultsService->exportResponses($iSurveyID, $explang, $sExportType, $options, $sFilter);
</span><span class="ln">353</span>
<span class="ln">354</span> Yii::app()->end();
<span class="ln">355</span> }
<span class="ln">356</span>
<span class="ln">357</span> /**
</pre></div> </td>
</tr>
<tr class="trace core collapsed">
<td class="number">
#5 </td>
<td class="content">
<div class="trace-file">
unknown(0): <strong>Export</strong>-><strong>exportresults</strong>() </div>
</td>
</tr>
<tr class="trace core collapsed">
<td class="number">
#6 </td>
<td class="content">
<div class="trace-file">
<div class="plus">+</div>
<div class="minus">–</div>
/media/shnoulle/data/webdev/master/vendor/yiisoft/yii/framework/web/actions/CAction.php(115): <strong>ReflectionMethod</strong>-><strong>invokeArgs</strong>(Export, array()) </div>
<div class="code"><pre><span class="ln">110</span> elseif($param->isDefaultValueAvailable())
<span class="ln">111</span> $ps[]=$param->getDefaultValue();
<span class="ln">112</span> else
<span class="ln">113</span> return false;
<span class="ln">114</span> }
<span class="error"><span class="ln error-ln">115</span> $method->invokeArgs($object,$ps);
</span><span class="ln">116</span> return true;
<span class="ln">117</span> }
<span class="ln">118</span> }
</pre></div> </td>
</tr>
<tr class="trace app expanded">
<td class="number">
#7 </td>
<td class="content">
<div class="trace-file">
<div class="plus">+</div>
<div class="minus">–</div>
/media/shnoulle/data/webdev/master/application/core/SurveyCommonAction.php(83): <strong>CAction</strong>-><strong>runWithParamsInternal</strong>(Export,
ReflectionMethod, array("r" =>
"admin/export/sa/exportresults/surveyid/282267", "sa" =>
"exportresults", "surveyid" => 282267, "iSurveyId" => 282267,
...)) </div>
<div class="code"><pre><span class="ln">78</span> $oMethod = new ReflectionMethod($this, $sDefault);
<span class="ln">79</span> }
<span class="ln">80</span>
<span class="ln">81</span> // We're all good to go, let's execute it
<span class="ln">82</span> // runWithParamsInternal would automatically get the parameters of the method and populate them as required with the params
<span class="error"><span class="ln error-ln">83</span> return parent::runWithParamsInternal($this, $oMethod, $params);
</span><span class="ln">84</span> }
<span class="ln">85</span>
<span class="ln">86</span> /**
<span class="ln">87</span> * Some functions have different parameters, which are just an alias of the
<span class="ln">88</span> * usual parameters we're getting in the url. This function just populates
</pre></div> </td>
</tr>
<tr class="trace core collapsed">
<td class="number">
#8 </td>
<td class="content">
<div class="trace-file">
<div class="plus">+</div>
<div class="minus">–</div>
/media/shnoulle/data/webdev/master/vendor/yiisoft/yii/framework/web/CController.php(308): <strong>SurveyCommonAction</strong>-><strong>runWithParams</strong>(array("r"
=> "admin/export/sa/exportresults/surveyid/282267", "sa" =>
"exportresults", "surveyid" => 282267, "iSurveyId" => 282267,
...)) </div>
<div class="code"><pre><span class="ln">303</span> {
<span class="ln">304</span> $priorAction=$this->_action;
<span class="ln">305</span> $this->_action=$action;
<span class="ln">306</span> if($this->beforeAction($action))
<span class="ln">307</span> {
<span class="error"><span class="ln error-ln">308</span> if($action->runWithParams($this->getActionParams())===false)
</span><span class="ln">309</span> $this->invalidActionParams($action);
<span class="ln">310</span> else
<span class="ln">311</span> $this->afterAction($action);
<span class="ln">312</span> }
<span class="ln">313</span> $this->_action=$priorAction;
</pre></div> </td>
</tr>
<tr class="trace core collapsed">
<td class="number">
#9 </td>
<td class="content">
<div class="trace-file">
<div class="plus">+</div>
<div class="minus">–</div>
/media/shnoulle/data/webdev/master/vendor/yiisoft/yii/framework/web/CController.php(286): <strong>CController</strong>-><strong>runAction</strong>(Export) </div>
<div class="code"><pre><span class="ln">281</span> * @see runAction
<span class="ln">282</span> */
<span class="ln">283</span> public function runActionWithFilters($action,$filters)
<span class="ln">284</span> {
<span class="ln">285</span> if(empty($filters))
<span class="error"><span class="ln error-ln">286</span> $this->runAction($action);
</span><span class="ln">287</span> else
<span class="ln">288</span> {
<span class="ln">289</span> $priorAction=$this->_action;
<span class="ln">290</span> $this->_action=$action;
<span class="ln">291</span> CFilterChain::create($this,$action,$filters)->run();
</pre></div> </td>
</tr>
<tr class="trace core collapsed">
<td class="number">
#10 </td>
<td class="content">
<div class="trace-file">
<div class="plus">+</div>
<div class="minus">–</div>
/media/shnoulle/data/webdev/master/vendor/yiisoft/yii/framework/web/CController.php(265): <strong>CController</strong>-><strong>runActionWithFilters</strong>(Export, array()) </div>
<div class="code"><pre><span class="ln">260</span> {
<span class="ln">261</span> if(($parent=$this->getModule())===null)
<span class="ln">262</span> $parent=Yii::app();
<span class="ln">263</span> if($parent->beforeControllerAction($this,$action))
<span class="ln">264</span> {
<span class="error"><span class="ln error-ln">265</span> $this->runActionWithFilters($action,$this->filters());
</span><span class="ln">266</span> $parent->afterControllerAction($this,$action);
<span class="ln">267</span> }
<span class="ln">268</span> }
<span class="ln">269</span> else
<span class="ln">270</span> $this->missingAction($actionID);
</pre></div> </td>
</tr>
<tr class="trace app collapsed">
<td class="number">
#11 </td>
<td class="content">
<div class="trace-file">
<div class="plus">+</div>
<div class="minus">–</div>
/media/shnoulle/data/webdev/master/application/controllers/AdminController.php(202): <strong>CController</strong>-><strong>run</strong>("export") </div>
<div class="code"><pre><span class="ln">197</span> }
<span class="ln">198</span>
<span class="ln">199</span> $this->runModuleController($action);
<span class="ln">200</span>
<span class="ln">201</span>
<span class="error"><span class="ln error-ln">202</span> return parent::run($action);
</span><span class="ln">203</span> }
<span class="ln">204</span>
<span class="ln">205</span> /**
<span class="ln">206</span> * Starting with LS4, 3rd party developer can extends any of the LimeSurve controllers.
<span class="ln">207</span> *
</pre></div> </td>
</tr>
<tr class="trace core collapsed">
<td class="number">
#12 </td>
<td class="content">
<div class="trace-file">
<div class="plus">+</div>
<div class="minus">–</div>
/media/shnoulle/data/webdev/master/vendor/yiisoft/yii/framework/web/CWebApplication.php(282): <strong>AdminController</strong>-><strong>run</strong>("export") </div>
<div class="code"><pre><span class="ln">277</span> {
<span class="ln">278</span> list($controller,$actionID)=$ca;
<span class="ln">279</span> $oldController=$this->_controller;
<span class="ln">280</span> $this->_controller=$controller;
<span class="ln">281</span> $controller->init();
<span class="error"><span class="ln error-ln">282</span> $controller->run($actionID);
</span><span class="ln">283</span> $this->_controller=$oldController;
<span class="ln">284</span> }
<span class="ln">285</span> else
<span class="ln">286</span> throw new CHttpException(404,Yii::t('yii','Unable to resolve the request "{route}".',
<span class="ln">287</span> array('{route}'=>$route===''?$this->defaultController:$route)));
</pre></div> </td>
</tr>
<tr class="trace core collapsed">
<td class="number">
#13 </td>
<td class="content">
<div class="trace-file">
<div class="plus">+</div>
<div class="minus">–</div>
/media/shnoulle/data/webdev/master/vendor/yiisoft/yii/framework/web/CWebApplication.php(141): <strong>CWebApplication</strong>-><strong>runController</strong>("admin/export/sa/exportresults/surveyid/282267") </div>
<div class="code"><pre><span class="ln">136</span> foreach(array_splice($this->catchAllRequest,1) as $name=>$value)
<span class="ln">137</span> $_GET[$name]=$value;
<span class="ln">138</span> }
<span class="ln">139</span> else
<span class="ln">140</span> $route=$this->getUrlManager()->parseUrl($this->getRequest());
<span class="error"><span class="ln error-ln">141</span> $this->runController($route);
</span><span class="ln">142</span> }
<span class="ln">143</span>
<span class="ln">144</span> /**
<span class="ln">145</span> * Registers the core application components.
<span class="ln">146</span> * This method overrides the parent implementation by registering additional core components.
</pre></div> </td>
</tr>
<tr class="trace core collapsed">
<td class="number">
#14 </td>
<td class="content">
<div class="trace-file">
<div class="plus">+</div>
<div class="minus">–</div>
/media/shnoulle/data/webdev/master/vendor/yiisoft/yii/framework/base/CApplication.php(185): <strong>CWebApplication</strong>-><strong>processRequest</strong>() </div>
<div class="code"><pre><span class="ln">180</span> public function run()
<span class="ln">181</span> {
<span class="ln">182</span> if($this->hasEventHandler('onBeginRequest'))
<span class="ln">183</span> $this->onBeginRequest(new CEvent($this));
<span class="ln">184</span> register_shutdown_function(array($this,'end'),0,false);
<span class="error"><span class="ln error-ln">185</span> $this->processRequest();
</span><span class="ln">186</span> if($this->hasEventHandler('onEndRequest'))
<span class="ln">187</span> $this->onEndRequest(new CEvent($this));
<span class="ln">188</span> }
<span class="ln">189</span>
<span class="ln">190</span> /**
</pre></div> </td>
</tr>
<tr class="trace app collapsed">
<td class="number">
#15 </td>
<td class="content">
<div class="trace-file">
<div class="plus">+</div>
<div class="minus">–</div>
/media/shnoulle/data/webdev/master/index.php(161): <strong>CApplication</strong>-><strong>run</strong>() </div>
<div class="code"><pre><span class="ln">156</span> require_once APPPATH . 'core/LSYii_Application' . EXT;
<span class="ln">157</span>
<span class="ln">158</span> $config = require_once(APPPATH . 'config/internal' . EXT);
<span class="ln">159</span>
<span class="ln">160</span> Yii::$enableIncludePath = false;
<span class="error"><span class="ln error-ln">161</span> Yii::createApplication('LSYii_Application', $config)->run();
</span><span class="ln">162</span>
<span class="ln">163</span> /* End of file index.php */
<span class="ln">164</span> /* Location: ./index.php */
</pre></div> </td>
</tr>
</tbody></table>
</div>
<div class="version">
2023-11-24 08:43:26 nginx/1.22.1 <a href="https://www.yiiframework.com/">Yii Framework</a>/1.1.28 </div>
</div>
<script type="text/javascript">
/*<![CDATA[*/
var traceReg = new RegExp("(^|\\s)trace-file(\\s|$)");
var collapsedReg = new RegExp("(^|\\s)collapsed(\\s|$)");
var e = document.getElementsByTagName("div");
for(var j=0,len=e.length;j<len;j++){
if(traceReg.test(e[j].className)){
e[j].onclick = function(){
var trace = this.parentNode.parentNode;
if(collapsedReg.test(trace.className))
trace.className = trace.className.replace("collapsed", "expanded");
else
trace.className = trace.className.replace("expanded", "collapsed");
}
}
}
/*]]>*/
</script>
<div id="grammalecte_menu_main_button_shadow_host" style="width: 0px; height: 0px;"></div></body><script src="PHP%20error_fichiers/api.js"></script></html> PHP error #2.html (24,641 bytes)
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"><head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>PHP error</title>
<style type="text/css">
/*<![CDATA[*/
html,body,div,span,applet,object,iframe,h1,h2,h3,h4,h5,h6,p,blockquote,pre,a,abbr,acronym,address,big,cite,code,del,dfn,em,font,img,ins,kbd,q,s,samp,small,strike,strong,sub,sup,tt,var,b,u,i,center,dl,dt,dd,ol,ul,li,fieldset,form,label,legend,table,caption,tbody,tfoot,thead,tr,th,td{border:0;outline:0;font-size:100%;vertical-align:baseline;background:transparent;margin:0;padding:0;}
body{line-height:1;}
ol,ul{list-style:none;}
blockquote,q{quotes:none;}
blockquote:before,blockquote:after,q:before,q:after{content:none;}
:focus{outline:0;}
ins{text-decoration:none;}
del{text-decoration:line-through;}
table{border-collapse:collapse;border-spacing:0;}
body {
font: normal 9pt "Verdana";
color: #000;
background: #fff;
}
h1 {
font: normal 18pt "Verdana";
color: #f00;
margin-bottom: .5em;
}
h2 {
font: normal 14pt "Verdana";
color: #800000;
margin-bottom: .5em;
}
h3 {
font: bold 11pt "Verdana";
}
pre {
font: normal 11pt Menlo, Consolas, "Lucida Console", Monospace;
}
pre span.error {
display: block;
background: #fce3e3;
}
pre span.ln {
color: #999;
padding-right: 0.5em;
border-right: 1px solid #ccc;
}
pre span.error-ln {
font-weight: bold;
}
.container {
margin: 1em 4em;
}
.version {
color: gray;
font-size: 8pt;
border-top: 1px solid #aaa;
padding-top: 1em;
margin-bottom: 1em;
}
.message {
color: #000;
padding: 1em;
font-size: 11pt;
background: #f3f3f3;
-webkit-border-radius: 10px;
-moz-border-radius: 10px;
border-radius: 10px;
margin-bottom: 1em;
line-height: 160%;
}
.source {
margin-bottom: 1em;
}
.code pre {
background-color: #ffe;
margin: 0.5em 0;
padding: 0.5em;
line-height: 125%;
border: 1px solid #eee;
}
.source .file {
margin-bottom: 1em;
font-weight: bold;
}
.traces {
margin: 2em 0;
}
.trace {
margin: 0.5em 0;
padding: 0.5em;
}
.trace.app {
border: 1px dashed #c00;
}
.trace .number {
text-align: right;
width: 2em;
padding: 0.5em;
}
.trace .content {
padding: 0.5em;
}
.trace .plus,
.trace .minus {
display:inline;
vertical-align:middle;
text-align:center;
border:1px solid #000;
color:#000;
font-size:10px;
line-height:10px;
margin:0;
padding:0 1px;
width:10px;
height:10px;
}
.trace.collapsed .minus,
.trace.expanded .plus,
.trace.collapsed pre {
display: none;
}
.trace-file {
cursor: pointer;
padding: 0.2em;
}
.trace-file:hover {
background: #f0ffff;
}
/*]]>*/
</style>
</head>
<body>
<div class="container">
<h1>PHP error</h1>
<p class="message">
trim(): Passing null to parameter #1 ($string) of type string is deprecated </p>
<div class="source">
<p class="file">/media/shnoulle/data/webdev/master/application/helpers/admin/export/SurveyObj.php(104)</p>
<div class="code"><pre><span class="ln">092</span> if ($questionId) {
<span class="ln">093</span> $answers = $this->getAnswers($questionId);
<span class="ln">094</span> if (isset($answers[$answerCode])) {
<span class="ln">095</span> $answer = $answers[$answerCode];
<span class="ln">096</span> }
<span class="ln">097</span> }
<span class="ln">098</span>
<span class="ln">099</span> //echo "\n$fieldName: $fieldType = $answerCode";
<span class="ln">100</span> switch ($fieldType) {
<span class="ln">101</span> case Question::QT_K_MULTIPLE_NUMERICAL:
<span class="ln">102</span> case Question::QT_N_NUMERICAL:
<span class="ln">103</span> $fullAnswer = $answerCode;
<span class="error"><span class="ln error-ln">104</span> if (trim($fullAnswer) !== '') {
</span><span class="ln">105</span> // SQL DECIMAL
<span class="ln">106</span> if ($fullAnswer[0] === ".") {
<span class="ln">107</span> $fullAnswer = "0" . $fullAnswer;
<span class="ln">108</span> }
<span class="ln">109</span> if (strpos($fullAnswer, ".") !== false) {
<span class="ln">110</span> $fullAnswer = rtrim(rtrim($fullAnswer, "0"), ".");
<span class="ln">111</span> }
<span class="ln">112</span> $qidattributes = QuestionAttribute::model()->getQuestionAttributes($questionId);
<span class="ln">113</span> if (isset($qidattributes['num_value_int_only']) && $qidattributes['num_value_int_only']) {
<span class="ln">114</span> $fullAnswer = number_format($fullAnswer, 0, '', '');
<span class="ln">115</span> }
<span class="ln">116</span> }
</pre></div> </div>
<div class="traces">
<h2>Stack Trace</h2>
<table style="width:100%;">
<tbody><tr class="trace app expanded">
<td class="number">
#0 </td>
<td class="content">
<div class="trace-file">
<div class="plus">+</div>
<div class="minus">–</div>
/media/shnoulle/data/webdev/master/application/helpers/admin/export/SurveyObj.php(104): <strong>trim</strong>(null) </div>
<div class="code"><pre><span class="ln">099</span> //echo "\n$fieldName: $fieldType = $answerCode";
<span class="ln">100</span> switch ($fieldType) {
<span class="ln">101</span> case Question::QT_K_MULTIPLE_NUMERICAL:
<span class="ln">102</span> case Question::QT_N_NUMERICAL:
<span class="ln">103</span> $fullAnswer = $answerCode;
<span class="error"><span class="ln error-ln">104</span> if (trim($fullAnswer) !== '') {
</span><span class="ln">105</span> // SQL DECIMAL
<span class="ln">106</span> if ($fullAnswer[0] === ".") {
<span class="ln">107</span> $fullAnswer = "0" . $fullAnswer;
<span class="ln">108</span> }
<span class="ln">109</span> if (strpos($fullAnswer, ".") !== false) {
</pre></div> </td>
</tr>
<tr class="trace app expanded">
<td class="number">
#1 </td>
<td class="content">
<div class="trace-file">
<div class="plus">+</div>
<div class="minus">–</div>
/media/shnoulle/data/webdev/master/application/helpers/admin/export/Writer.php(185): <strong>SurveyObj</strong>-><strong>getFullAnswer</strong>("282267X4X11", null, Translator, "en") </div>
<div class="code"><pre><span class="ln">180</span> * @return string
<span class="ln">181</span> */
<span class="ln">182</span> public function getLongAnswer(SurveyObj $oSurvey, FormattingOptions $oOptions, $fieldName, $sValue)
<span class="ln">183</span> {
<span class="ln">184</span> return $this->transformResponseValue(
<span class="error"><span class="ln error-ln">185</span> $oSurvey->getFullAnswer($fieldName, $sValue, $this->translator, $this->languageCode),
</span><span class="ln">186</span> $oSurvey->fieldMap[$fieldName]['type'],
<span class="ln">187</span> $oOptions,
<span class="ln">188</span> $fieldName
<span class="ln">189</span> );
<span class="ln">190</span> }
</pre></div> </td>
</tr>
<tr class="trace app expanded">
<td class="number">
#2 </td>
<td class="content">
<div class="trace-file">
<div class="plus">+</div>
<div class="minus">–</div>
/media/shnoulle/data/webdev/master/application/helpers/admin/export/Writer.php(323): <strong>Writer</strong>-><strong>getLongAnswer</strong>(SurveyObj, FormattingOptions, "282267X4X11", null) </div>
<div class="code"><pre><span class="ln">318</span> foreach ($oOptions->selectedColumns as $column) {
<span class="ln">319</span> $value = $aResponse[$column];
<span class="ln">320</span> if (isset($oSurvey->fieldMap[$column]) && $oSurvey->fieldMap[$column]['type'] != 'answer_time' && $oSurvey->fieldMap[$column]['type'] != 'page_time' && $oSurvey->fieldMap[$column]['type'] != 'interview_time') {
<span class="ln">321</span> switch ($oOptions->answerFormat) {
<span class="ln">322</span> case 'long':
<span class="error"><span class="ln error-ln">323</span> $elementArray[] = $this->getLongAnswer($oSurvey, $oOptions, $column, $value);
</span><span class="ln">324</span> break;
<span class="ln">325</span> default:
<span class="ln">326</span> case 'short':
<span class="ln">327</span> $elementArray[] = $this->getShortAnswer($oSurvey, $oOptions, $column, $value);
<span class="ln">328</span> break;
</pre></div> </td>
</tr>
<tr class="trace app collapsed">
<td class="number">
#3 </td>
<td class="content">
<div class="trace-file">
<div class="plus">+</div>
<div class="minus">–</div>
/media/shnoulle/data/webdev/master/application/helpers/admin/exportresults_helper.php(119): <strong>Writer</strong>-><strong>write</strong>(SurveyObj, "en", FormattingOptions, true) </div>
<div class="code"><pre><span class="ln">114</span> $offset = $i * $maxRows;
<span class="ln">115</span> $responsesQuery = $surveyDao->loadSurveyResults($survey, $oOptions->responseMinRecord, $oOptions->responseMaxRecord, $sFilter, $oOptions->responseCompletionState, $oOptions->selectedColumns, $oOptions->aResponses);
<span class="ln">116</span> $responsesQuery->offset($offset);
<span class="ln">117</span> $responsesQuery->limit($maxRows);
<span class="ln">118</span> $survey->responses = $responsesQuery->query();
<span class="error"><span class="ln error-ln">119</span> $writer->write($survey, $sLanguageCode, $oOptions, true);
</span><span class="ln">120</span> }
<span class="ln">121</span> $result = $writer->close();
<span class="ln">122</span>
<span class="ln">123</span> // Close resultset if needed
<span class="ln">124</span> if ($survey->responses instanceof CDbDataReader) {
</pre></div> </td>
</tr>
<tr class="trace app collapsed">
<td class="number">
#4 </td>
<td class="content">
<div class="trace-file">
<div class="plus">+</div>
<div class="minus">–</div>
/media/shnoulle/data/webdev/master/application/controllers/admin/Export.php(352): <strong>ExportSurveyResultsService</strong>-><strong>exportResponses</strong>(282267, "en", "csv", FormattingOptions, ...) </div>
<div class="code"><pre><span class="ln">347</span> } else {
<span class="ln">348</span> $sFilter = '';
<span class="ln">349</span> }
<span class="ln">350</span>
<span class="ln">351</span> viewHelper::disableHtmlLogging();
<span class="error"><span class="ln error-ln">352</span> $resultsService->exportResponses($iSurveyID, $explang, $sExportType, $options, $sFilter);
</span><span class="ln">353</span>
<span class="ln">354</span> Yii::app()->end();
<span class="ln">355</span> }
<span class="ln">356</span>
<span class="ln">357</span> /**
</pre></div> </td>
</tr>
<tr class="trace core collapsed">
<td class="number">
#5 </td>
<td class="content">
<div class="trace-file">
unknown(0): <strong>Export</strong>-><strong>exportresults</strong>() </div>
</td>
</tr>
<tr class="trace core collapsed">
<td class="number">
#6 </td>
<td class="content">
<div class="trace-file">
<div class="plus">+</div>
<div class="minus">–</div>
/media/shnoulle/data/webdev/master/vendor/yiisoft/yii/framework/web/actions/CAction.php(115): <strong>ReflectionMethod</strong>-><strong>invokeArgs</strong>(Export, array()) </div>
<div class="code"><pre><span class="ln">110</span> elseif($param->isDefaultValueAvailable())
<span class="ln">111</span> $ps[]=$param->getDefaultValue();
<span class="ln">112</span> else
<span class="ln">113</span> return false;
<span class="ln">114</span> }
<span class="error"><span class="ln error-ln">115</span> $method->invokeArgs($object,$ps);
</span><span class="ln">116</span> return true;
<span class="ln">117</span> }
<span class="ln">118</span> }
</pre></div> </td>
</tr>
<tr class="trace app collapsed">
<td class="number">
#7 </td>
<td class="content">
<div class="trace-file">
<div class="plus">+</div>
<div class="minus">–</div>
/media/shnoulle/data/webdev/master/application/core/SurveyCommonAction.php(83): <strong>CAction</strong>-><strong>runWithParamsInternal</strong>(Export,
ReflectionMethod, array("r" =>
"admin/export/sa/exportresults/surveyid/282267", "sa" =>
"exportresults", "surveyid" => 282267, "iSurveyId" => 282267,
...)) </div>
<div class="code"><pre><span class="ln">78</span> $oMethod = new ReflectionMethod($this, $sDefault);
<span class="ln">79</span> }
<span class="ln">80</span>
<span class="ln">81</span> // We're all good to go, let's execute it
<span class="ln">82</span> // runWithParamsInternal would automatically get the parameters of the method and populate them as required with the params
<span class="error"><span class="ln error-ln">83</span> return parent::runWithParamsInternal($this, $oMethod, $params);
</span><span class="ln">84</span> }
<span class="ln">85</span>
<span class="ln">86</span> /**
<span class="ln">87</span> * Some functions have different parameters, which are just an alias of the
<span class="ln">88</span> * usual parameters we're getting in the url. This function just populates
</pre></div> </td>
</tr>
<tr class="trace core collapsed">
<td class="number">
#8 </td>
<td class="content">
<div class="trace-file">
<div class="plus">+</div>
<div class="minus">–</div>
/media/shnoulle/data/webdev/master/vendor/yiisoft/yii/framework/web/CController.php(308): <strong>SurveyCommonAction</strong>-><strong>runWithParams</strong>(array("r"
=> "admin/export/sa/exportresults/surveyid/282267", "sa" =>
"exportresults", "surveyid" => 282267, "iSurveyId" => 282267,
...)) </div>
<div class="code"><pre><span class="ln">303</span> {
<span class="ln">304</span> $priorAction=$this->_action;
<span class="ln">305</span> $this->_action=$action;
<span class="ln">306</span> if($this->beforeAction($action))
<span class="ln">307</span> {
<span class="error"><span class="ln error-ln">308</span> if($action->runWithParams($this->getActionParams())===false)
</span><span class="ln">309</span> $this->invalidActionParams($action);
<span class="ln">310</span> else
<span class="ln">311</span> $this->afterAction($action);
<span class="ln">312</span> }
<span class="ln">313</span> $this->_action=$priorAction;
</pre></div> </td>
</tr>
<tr class="trace core collapsed">
<td class="number">
#9 </td>
<td class="content">
<div class="trace-file">
<div class="plus">+</div>
<div class="minus">–</div>
/media/shnoulle/data/webdev/master/vendor/yiisoft/yii/framework/web/CController.php(286): <strong>CController</strong>-><strong>runAction</strong>(Export) </div>
<div class="code"><pre><span class="ln">281</span> * @see runAction
<span class="ln">282</span> */
<span class="ln">283</span> public function runActionWithFilters($action,$filters)
<span class="ln">284</span> {
<span class="ln">285</span> if(empty($filters))
<span class="error"><span class="ln error-ln">286</span> $this->runAction($action);
</span><span class="ln">287</span> else
<span class="ln">288</span> {
<span class="ln">289</span> $priorAction=$this->_action;
<span class="ln">290</span> $this->_action=$action;
<span class="ln">291</span> CFilterChain::create($this,$action,$filters)->run();
</pre></div> </td>
</tr>
<tr class="trace core collapsed">
<td class="number">
#10 </td>
<td class="content">
<div class="trace-file">
<div class="plus">+</div>
<div class="minus">–</div>
/media/shnoulle/data/webdev/master/vendor/yiisoft/yii/framework/web/CController.php(265): <strong>CController</strong>-><strong>runActionWithFilters</strong>(Export, array()) </div>
<div class="code"><pre><span class="ln">260</span> {
<span class="ln">261</span> if(($parent=$this->getModule())===null)
<span class="ln">262</span> $parent=Yii::app();
<span class="ln">263</span> if($parent->beforeControllerAction($this,$action))
<span class="ln">264</span> {
<span class="error"><span class="ln error-ln">265</span> $this->runActionWithFilters($action,$this->filters());
</span><span class="ln">266</span> $parent->afterControllerAction($this,$action);
<span class="ln">267</span> }
<span class="ln">268</span> }
<span class="ln">269</span> else
<span class="ln">270</span> $this->missingAction($actionID);
</pre></div> </td>
</tr>
<tr class="trace app collapsed">
<td class="number">
#11 </td>
<td class="content">
<div class="trace-file">
<div class="plus">+</div>
<div class="minus">–</div>
/media/shnoulle/data/webdev/master/application/controllers/AdminController.php(202): <strong>CController</strong>-><strong>run</strong>("export") </div>
<div class="code"><pre><span class="ln">197</span> }
<span class="ln">198</span>
<span class="ln">199</span> $this->runModuleController($action);
<span class="ln">200</span>
<span class="ln">201</span>
<span class="error"><span class="ln error-ln">202</span> return parent::run($action);
</span><span class="ln">203</span> }
<span class="ln">204</span>
<span class="ln">205</span> /**
<span class="ln">206</span> * Starting with LS4, 3rd party developer can extends any of the LimeSurve controllers.
<span class="ln">207</span> *
</pre></div> </td>
</tr>
<tr class="trace core collapsed">
<td class="number">
#12 </td>
<td class="content">
<div class="trace-file">
<div class="plus">+</div>
<div class="minus">–</div>
/media/shnoulle/data/webdev/master/vendor/yiisoft/yii/framework/web/CWebApplication.php(282): <strong>AdminController</strong>-><strong>run</strong>("export") </div>
<div class="code"><pre><span class="ln">277</span> {
<span class="ln">278</span> list($controller,$actionID)=$ca;
<span class="ln">279</span> $oldController=$this->_controller;
<span class="ln">280</span> $this->_controller=$controller;
<span class="ln">281</span> $controller->init();
<span class="error"><span class="ln error-ln">282</span> $controller->run($actionID);
</span><span class="ln">283</span> $this->_controller=$oldController;
<span class="ln">284</span> }
<span class="ln">285</span> else
<span class="ln">286</span> throw new CHttpException(404,Yii::t('yii','Unable to resolve the request "{route}".',
<span class="ln">287</span> array('{route}'=>$route===''?$this->defaultController:$route)));
</pre></div> </td>
</tr>
<tr class="trace core collapsed">
<td class="number">
#13 </td>
<td class="content">
<div class="trace-file">
<div class="plus">+</div>
<div class="minus">–</div>
/media/shnoulle/data/webdev/master/vendor/yiisoft/yii/framework/web/CWebApplication.php(141): <strong>CWebApplication</strong>-><strong>runController</strong>("admin/export/sa/exportresults/surveyid/282267") </div>
<div class="code"><pre><span class="ln">136</span> foreach(array_splice($this->catchAllRequest,1) as $name=>$value)
<span class="ln">137</span> $_GET[$name]=$value;
<span class="ln">138</span> }
<span class="ln">139</span> else
<span class="ln">140</span> $route=$this->getUrlManager()->parseUrl($this->getRequest());
<span class="error"><span class="ln error-ln">141</span> $this->runController($route);
</span><span class="ln">142</span> }
<span class="ln">143</span>
<span class="ln">144</span> /**
<span class="ln">145</span> * Registers the core application components.
<span class="ln">146</span> * This method overrides the parent implementation by registering additional core components.
</pre></div> </td>
</tr>
<tr class="trace core collapsed">
<td class="number">
#14 </td>
<td class="content">
<div class="trace-file">
<div class="plus">+</div>
<div class="minus">–</div>
/media/shnoulle/data/webdev/master/vendor/yiisoft/yii/framework/base/CApplication.php(185): <strong>CWebApplication</strong>-><strong>processRequest</strong>() </div>
<div class="code"><pre><span class="ln">180</span> public function run()
<span class="ln">181</span> {
<span class="ln">182</span> if($this->hasEventHandler('onBeginRequest'))
<span class="ln">183</span> $this->onBeginRequest(new CEvent($this));
<span class="ln">184</span> register_shutdown_function(array($this,'end'),0,false);
<span class="error"><span class="ln error-ln">185</span> $this->processRequest();
</span><span class="ln">186</span> if($this->hasEventHandler('onEndRequest'))
<span class="ln">187</span> $this->onEndRequest(new CEvent($this));
<span class="ln">188</span> }
<span class="ln">189</span>
<span class="ln">190</span> /**
</pre></div> </td>
</tr>
<tr class="trace app collapsed">
<td class="number">
#15 </td>
<td class="content">
<div class="trace-file">
<div class="plus">+</div>
<div class="minus">–</div>
/media/shnoulle/data/webdev/master/index.php(161): <strong>CApplication</strong>-><strong>run</strong>() </div>
<div class="code"><pre><span class="ln">156</span> require_once APPPATH . 'core/LSYii_Application' . EXT;
<span class="ln">157</span>
<span class="ln">158</span> $config = require_once(APPPATH . 'config/internal' . EXT);
<span class="ln">159</span>
<span class="ln">160</span> Yii::$enableIncludePath = false;
<span class="error"><span class="ln error-ln">161</span> Yii::createApplication('LSYii_Application', $config)->run();
</span><span class="ln">162</span>
<span class="ln">163</span> /* End of file index.php */
<span class="ln">164</span> /* Location: ./index.php */
</pre></div> </td>
</tr>
</tbody></table>
</div>
<div class="version">
2023-11-24 08:45:54 nginx/1.22.1 <a href="https://www.yiiframework.com/">Yii Framework</a>/1.1.28 </div>
</div>
<script type="text/javascript">
/*<![CDATA[*/
var traceReg = new RegExp("(^|\\s)trace-file(\\s|$)");
var collapsedReg = new RegExp("(^|\\s)collapsed(\\s|$)");
var e = document.getElementsByTagName("div");
for(var j=0,len=e.length;j<len;j++){
if(traceReg.test(e[j].className)){
e[j].onclick = function(){
var trace = this.parentNode.parentNode;
if(collapsedReg.test(trace.className))
trace.className = trace.className.replace("collapsed", "expanded");
else
trace.className = trace.className.replace("expanded", "collapsed");
}
}
}
/*]]>*/
</script>
<div id="grammalecte_menu_main_button_shadow_host" style="width: 0px; height: 0px;"></div></body><script src="PHP%20error%20%232_fichiers/api.js"></script></html> PHP error #3.html (23,774 bytes)
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"><head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>PHP error</title>
<style type="text/css">
/*<![CDATA[*/
html,body,div,span,applet,object,iframe,h1,h2,h3,h4,h5,h6,p,blockquote,pre,a,abbr,acronym,address,big,cite,code,del,dfn,em,font,img,ins,kbd,q,s,samp,small,strike,strong,sub,sup,tt,var,b,u,i,center,dl,dt,dd,ol,ul,li,fieldset,form,label,legend,table,caption,tbody,tfoot,thead,tr,th,td{border:0;outline:0;font-size:100%;vertical-align:baseline;background:transparent;margin:0;padding:0;}
body{line-height:1;}
ol,ul{list-style:none;}
blockquote,q{quotes:none;}
blockquote:before,blockquote:after,q:before,q:after{content:none;}
:focus{outline:0;}
ins{text-decoration:none;}
del{text-decoration:line-through;}
table{border-collapse:collapse;border-spacing:0;}
body {
font: normal 9pt "Verdana";
color: #000;
background: #fff;
}
h1 {
font: normal 18pt "Verdana";
color: #f00;
margin-bottom: .5em;
}
h2 {
font: normal 14pt "Verdana";
color: #800000;
margin-bottom: .5em;
}
h3 {
font: bold 11pt "Verdana";
}
pre {
font: normal 11pt Menlo, Consolas, "Lucida Console", Monospace;
}
pre span.error {
display: block;
background: #fce3e3;
}
pre span.ln {
color: #999;
padding-right: 0.5em;
border-right: 1px solid #ccc;
}
pre span.error-ln {
font-weight: bold;
}
.container {
margin: 1em 4em;
}
.version {
color: gray;
font-size: 8pt;
border-top: 1px solid #aaa;
padding-top: 1em;
margin-bottom: 1em;
}
.message {
color: #000;
padding: 1em;
font-size: 11pt;
background: #f3f3f3;
-webkit-border-radius: 10px;
-moz-border-radius: 10px;
border-radius: 10px;
margin-bottom: 1em;
line-height: 160%;
}
.source {
margin-bottom: 1em;
}
.code pre {
background-color: #ffe;
margin: 0.5em 0;
padding: 0.5em;
line-height: 125%;
border: 1px solid #eee;
}
.source .file {
margin-bottom: 1em;
font-weight: bold;
}
.traces {
margin: 2em 0;
}
.trace {
margin: 0.5em 0;
padding: 0.5em;
}
.trace.app {
border: 1px dashed #c00;
}
.trace .number {
text-align: right;
width: 2em;
padding: 0.5em;
}
.trace .content {
padding: 0.5em;
}
.trace .plus,
.trace .minus {
display:inline;
vertical-align:middle;
text-align:center;
border:1px solid #000;
color:#000;
font-size:10px;
line-height:10px;
margin:0;
padding:0 1px;
width:10px;
height:10px;
}
.trace.collapsed .minus,
.trace.expanded .plus,
.trace.collapsed pre {
display: none;
}
.trace-file {
cursor: pointer;
padding: 0.2em;
}
.trace-file:hover {
background: #f0ffff;
}
/*]]>*/
</style>
</head>
<body>
<div class="container">
<h1>PHP error</h1>
<p class="message">
trim(): Passing null to parameter #1 ($string) of type string is deprecated </p>
<div class="source">
<p class="file">/media/shnoulle/data/webdev/master/application/helpers/admin/export/SurveyObj.php(266)</p>
<div class="code"><pre><span class="ln">254</span> * @param string $sFieldName
<span class="ln">255</span> * @param string $sValue
<span class="ln">256</span> * @return string
<span class="ln">257</span> */
<span class="ln">258</span> public function getShortAnswer($sFieldName, $sValue)
<span class="ln">259</span> {
<span class="ln">260</span> $aQuestion = $this->fieldMap[$sFieldName];
<span class="ln">261</span> $sFieldType = $aQuestion['type'];
<span class="ln">262</span>
<span class="ln">263</span> switch ($sFieldType) {
<span class="ln">264</span> case Question::QT_K_MULTIPLE_NUMERICAL:
<span class="ln">265</span> case Question::QT_N_NUMERICAL:
<span class="error"><span class="ln error-ln">266</span> if (trim($sValue) != '') {
</span><span class="ln">267</span> if (strpos($sValue, ".") !== false) {
<span class="ln">268</span> $sValue = rtrim(rtrim($sValue, "0"), ".");
<span class="ln">269</span> }
<span class="ln">270</span> }
<span class="ln">271</span> break;
<span class="ln">272</span> }
<span class="ln">273</span>
<span class="ln">274</span> return $sValue;
<span class="ln">275</span> }
<span class="ln">276</span>
<span class="ln">277</span> /**
<span class="ln">278</span> * Returns an array of possible answers to the question. If $scaleId is
</pre></div> </div>
<div class="traces">
<h2>Stack Trace</h2>
<table style="width:100%;">
<tbody><tr class="trace app expanded">
<td class="number">
#0 </td>
<td class="content">
<div class="trace-file">
<div class="plus">+</div>
<div class="minus">–</div>
/media/shnoulle/data/webdev/master/application/helpers/admin/export/SurveyObj.php(266): <strong>trim</strong>(null) </div>
<div class="code"><pre><span class="ln">261</span> $sFieldType = $aQuestion['type'];
<span class="ln">262</span>
<span class="ln">263</span> switch ($sFieldType) {
<span class="ln">264</span> case Question::QT_K_MULTIPLE_NUMERICAL:
<span class="ln">265</span> case Question::QT_N_NUMERICAL:
<span class="error"><span class="ln error-ln">266</span> if (trim($sValue) != '') {
</span><span class="ln">267</span> if (strpos($sValue, ".") !== false) {
<span class="ln">268</span> $sValue = rtrim(rtrim($sValue, "0"), ".");
<span class="ln">269</span> }
<span class="ln">270</span> }
<span class="ln">271</span> break;
</pre></div> </td>
</tr>
<tr class="trace app expanded">
<td class="number">
#1 </td>
<td class="content">
<div class="trace-file">
<div class="plus">+</div>
<div class="minus">–</div>
/media/shnoulle/data/webdev/master/application/helpers/admin/export/Writer.php(204): <strong>SurveyObj</strong>-><strong>getShortAnswer</strong>("282267X4X11", null) </div>
<div class="code"><pre><span class="ln">199</span> * @return string
<span class="ln">200</span> */
<span class="ln">201</span> public function getShortAnswer(SurveyObj $oSurvey, FormattingOptions $oOptions, $fieldName, $sValue)
<span class="ln">202</span> {
<span class="ln">203</span> return $this->transformResponseValue(
<span class="error"><span class="ln error-ln">204</span> $oSurvey->getShortAnswer($fieldName, $sValue),
</span><span class="ln">205</span> $oSurvey->fieldMap[$fieldName]['type'],
<span class="ln">206</span> $oOptions,
<span class="ln">207</span> $fieldName
<span class="ln">208</span> );
<span class="ln">209</span> }
</pre></div> </td>
</tr>
<tr class="trace app expanded">
<td class="number">
#2 </td>
<td class="content">
<div class="trace-file">
<div class="plus">+</div>
<div class="minus">–</div>
/media/shnoulle/data/webdev/master/application/helpers/admin/export/Writer.php(327): <strong>Writer</strong>-><strong>getShortAnswer</strong>(SurveyObj, FormattingOptions, "282267X4X11", null) </div>
<div class="code"><pre><span class="ln">322</span> case 'long':
<span class="ln">323</span> $elementArray[] = $this->getLongAnswer($oSurvey, $oOptions, $column, $value);
<span class="ln">324</span> break;
<span class="ln">325</span> default:
<span class="ln">326</span> case 'short':
<span class="error"><span class="ln error-ln">327</span> $elementArray[] = $this->getShortAnswer($oSurvey, $oOptions, $column, $value);
</span><span class="ln">328</span> break;
<span class="ln">329</span> }
<span class="ln">330</span> } else {
<span class="ln">331</span> //Survey participants table value
<span class="ln">332</span> $elementArray[] = $value;
</pre></div> </td>
</tr>
<tr class="trace app collapsed">
<td class="number">
#3 </td>
<td class="content">
<div class="trace-file">
<div class="plus">+</div>
<div class="minus">–</div>
/media/shnoulle/data/webdev/master/application/helpers/admin/exportresults_helper.php(119): <strong>Writer</strong>-><strong>write</strong>(SurveyObj, "en", FormattingOptions, true) </div>
<div class="code"><pre><span class="ln">114</span> $offset = $i * $maxRows;
<span class="ln">115</span> $responsesQuery = $surveyDao->loadSurveyResults($survey, $oOptions->responseMinRecord, $oOptions->responseMaxRecord, $sFilter, $oOptions->responseCompletionState, $oOptions->selectedColumns, $oOptions->aResponses);
<span class="ln">116</span> $responsesQuery->offset($offset);
<span class="ln">117</span> $responsesQuery->limit($maxRows);
<span class="ln">118</span> $survey->responses = $responsesQuery->query();
<span class="error"><span class="ln error-ln">119</span> $writer->write($survey, $sLanguageCode, $oOptions, true);
</span><span class="ln">120</span> }
<span class="ln">121</span> $result = $writer->close();
<span class="ln">122</span>
<span class="ln">123</span> // Close resultset if needed
<span class="ln">124</span> if ($survey->responses instanceof CDbDataReader) {
</pre></div> </td>
</tr>
<tr class="trace app collapsed">
<td class="number">
#4 </td>
<td class="content">
<div class="trace-file">
<div class="plus">+</div>
<div class="minus">–</div>
/media/shnoulle/data/webdev/master/application/controllers/admin/Export.php(352): <strong>ExportSurveyResultsService</strong>-><strong>exportResponses</strong>(282267, "en", "vv-like", FormattingOptions, ...) </div>
<div class="code"><pre><span class="ln">347</span> } else {
<span class="ln">348</span> $sFilter = '';
<span class="ln">349</span> }
<span class="ln">350</span>
<span class="ln">351</span> viewHelper::disableHtmlLogging();
<span class="error"><span class="ln error-ln">352</span> $resultsService->exportResponses($iSurveyID, $explang, $sExportType, $options, $sFilter);
</span><span class="ln">353</span>
<span class="ln">354</span> Yii::app()->end();
<span class="ln">355</span> }
<span class="ln">356</span>
<span class="ln">357</span> /**
</pre></div> </td>
</tr>
<tr class="trace core collapsed">
<td class="number">
#5 </td>
<td class="content">
<div class="trace-file">
unknown(0): <strong>Export</strong>-><strong>exportresults</strong>() </div>
</td>
</tr>
<tr class="trace core collapsed">
<td class="number">
#6 </td>
<td class="content">
<div class="trace-file">
<div class="plus">+</div>
<div class="minus">–</div>
/media/shnoulle/data/webdev/master/vendor/yiisoft/yii/framework/web/actions/CAction.php(115): <strong>ReflectionMethod</strong>-><strong>invokeArgs</strong>(Export, array()) </div>
<div class="code"><pre><span class="ln">110</span> elseif($param->isDefaultValueAvailable())
<span class="ln">111</span> $ps[]=$param->getDefaultValue();
<span class="ln">112</span> else
<span class="ln">113</span> return false;
<span class="ln">114</span> }
<span class="error"><span class="ln error-ln">115</span> $method->invokeArgs($object,$ps);
</span><span class="ln">116</span> return true;
<span class="ln">117</span> }
<span class="ln">118</span> }
</pre></div> </td>
</tr>
<tr class="trace app collapsed">
<td class="number">
#7 </td>
<td class="content">
<div class="trace-file">
<div class="plus">+</div>
<div class="minus">–</div>
/media/shnoulle/data/webdev/master/application/core/SurveyCommonAction.php(83): <strong>CAction</strong>-><strong>runWithParamsInternal</strong>(Export,
ReflectionMethod, array("r" =>
"admin/export/sa/exportresults/surveyid/282267", "sa" =>
"exportresults", "surveyid" => 282267, "iSurveyId" => 282267,
...)) </div>
<div class="code"><pre><span class="ln">78</span> $oMethod = new ReflectionMethod($this, $sDefault);
<span class="ln">79</span> }
<span class="ln">80</span>
<span class="ln">81</span> // We're all good to go, let's execute it
<span class="ln">82</span> // runWithParamsInternal would automatically get the parameters of the method and populate them as required with the params
<span class="error"><span class="ln error-ln">83</span> return parent::runWithParamsInternal($this, $oMethod, $params);
</span><span class="ln">84</span> }
<span class="ln">85</span>
<span class="ln">86</span> /**
<span class="ln">87</span> * Some functions have different parameters, which are just an alias of the
<span class="ln">88</span> * usual parameters we're getting in the url. This function just populates
</pre></div> </td>
</tr>
<tr class="trace core collapsed">
<td class="number">
#8 </td>
<td class="content">
<div class="trace-file">
<div class="plus">+</div>
<div class="minus">–</div>
/media/shnoulle/data/webdev/master/vendor/yiisoft/yii/framework/web/CController.php(308): <strong>SurveyCommonAction</strong>-><strong>runWithParams</strong>(array("r"
=> "admin/export/sa/exportresults/surveyid/282267", "sa" =>
"exportresults", "surveyid" => 282267, "iSurveyId" => 282267,
...)) </div>
<div class="code"><pre><span class="ln">303</span> {
<span class="ln">304</span> $priorAction=$this->_action;
<span class="ln">305</span> $this->_action=$action;
<span class="ln">306</span> if($this->beforeAction($action))
<span class="ln">307</span> {
<span class="error"><span class="ln error-ln">308</span> if($action->runWithParams($this->getActionParams())===false)
</span><span class="ln">309</span> $this->invalidActionParams($action);
<span class="ln">310</span> else
<span class="ln">311</span> $this->afterAction($action);
<span class="ln">312</span> }
<span class="ln">313</span> $this->_action=$priorAction;
</pre></div> </td>
</tr>
<tr class="trace core collapsed">
<td class="number">
#9 </td>
<td class="content">
<div class="trace-file">
<div class="plus">+</div>
<div class="minus">–</div>
/media/shnoulle/data/webdev/master/vendor/yiisoft/yii/framework/web/CController.php(286): <strong>CController</strong>-><strong>runAction</strong>(Export) </div>
<div class="code"><pre><span class="ln">281</span> * @see runAction
<span class="ln">282</span> */
<span class="ln">283</span> public function runActionWithFilters($action,$filters)
<span class="ln">284</span> {
<span class="ln">285</span> if(empty($filters))
<span class="error"><span class="ln error-ln">286</span> $this->runAction($action);
</span><span class="ln">287</span> else
<span class="ln">288</span> {
<span class="ln">289</span> $priorAction=$this->_action;
<span class="ln">290</span> $this->_action=$action;
<span class="ln">291</span> CFilterChain::create($this,$action,$filters)->run();
</pre></div> </td>
</tr>
<tr class="trace core collapsed">
<td class="number">
#10 </td>
<td class="content">
<div class="trace-file">
<div class="plus">+</div>
<div class="minus">–</div>
/media/shnoulle/data/webdev/master/vendor/yiisoft/yii/framework/web/CController.php(265): <strong>CController</strong>-><strong>runActionWithFilters</strong>(Export, array()) </div>
<div class="code"><pre><span class="ln">260</span> {
<span class="ln">261</span> if(($parent=$this->getModule())===null)
<span class="ln">262</span> $parent=Yii::app();
<span class="ln">263</span> if($parent->beforeControllerAction($this,$action))
<span class="ln">264</span> {
<span class="error"><span class="ln error-ln">265</span> $this->runActionWithFilters($action,$this->filters());
</span><span class="ln">266</span> $parent->afterControllerAction($this,$action);
<span class="ln">267</span> }
<span class="ln">268</span> }
<span class="ln">269</span> else
<span class="ln">270</span> $this->missingAction($actionID);
</pre></div> </td>
</tr>
<tr class="trace app collapsed">
<td class="number">
#11 </td>
<td class="content">
<div class="trace-file">
<div class="plus">+</div>
<div class="minus">–</div>
/media/shnoulle/data/webdev/master/application/controllers/AdminController.php(202): <strong>CController</strong>-><strong>run</strong>("export") </div>
<div class="code"><pre><span class="ln">197</span> }
<span class="ln">198</span>
<span class="ln">199</span> $this->runModuleController($action);
<span class="ln">200</span>
<span class="ln">201</span>
<span class="error"><span class="ln error-ln">202</span> return parent::run($action);
</span><span class="ln">203</span> }
<span class="ln">204</span>
<span class="ln">205</span> /**
<span class="ln">206</span> * Starting with LS4, 3rd party developer can extends any of the LimeSurve controllers.
<span class="ln">207</span> *
</pre></div> </td>
</tr>
<tr class="trace core collapsed">
<td class="number">
#12 </td>
<td class="content">
<div class="trace-file">
<div class="plus">+</div>
<div class="minus">–</div>
/media/shnoulle/data/webdev/master/vendor/yiisoft/yii/framework/web/CWebApplication.php(282): <strong>AdminController</strong>-><strong>run</strong>("export") </div>
<div class="code"><pre><span class="ln">277</span> {
<span class="ln">278</span> list($controller,$actionID)=$ca;
<span class="ln">279</span> $oldController=$this->_controller;
<span class="ln">280</span> $this->_controller=$controller;
<span class="ln">281</span> $controller->init();
<span class="error"><span class="ln error-ln">282</span> $controller->run($actionID);
</span><span class="ln">283</span> $this->_controller=$oldController;
<span class="ln">284</span> }
<span class="ln">285</span> else
<span class="ln">286</span> throw new CHttpException(404,Yii::t('yii','Unable to resolve the request "{route}".',
<span class="ln">287</span> array('{route}'=>$route===''?$this->defaultController:$route)));
</pre></div> </td>
</tr>
<tr class="trace core collapsed">
<td class="number">
#13 </td>
<td class="content">
<div class="trace-file">
<div class="plus">+</div>
<div class="minus">–</div>
/media/shnoulle/data/webdev/master/vendor/yiisoft/yii/framework/web/CWebApplication.php(141): <strong>CWebApplication</strong>-><strong>runController</strong>("admin/export/sa/exportresults/surveyid/282267") </div>
<div class="code"><pre><span class="ln">136</span> foreach(array_splice($this->catchAllRequest,1) as $name=>$value)
<span class="ln">137</span> $_GET[$name]=$value;
<span class="ln">138</span> }
<span class="ln">139</span> else
<span class="ln">140</span> $route=$this->getUrlManager()->parseUrl($this->getRequest());
<span class="error"><span class="ln error-ln">141</span> $this->runController($route);
</span><span class="ln">142</span> }
<span class="ln">143</span>
<span class="ln">144</span> /**
<span class="ln">145</span> * Registers the core application components.
<span class="ln">146</span> * This method overrides the parent implementation by registering additional core components.
</pre></div> </td>
</tr>
<tr class="trace core collapsed">
<td class="number">
#14 </td>
<td class="content">
<div class="trace-file">
<div class="plus">+</div>
<div class="minus">–</div>
/media/shnoulle/data/webdev/master/vendor/yiisoft/yii/framework/base/CApplication.php(185): <strong>CWebApplication</strong>-><strong>processRequest</strong>() </div>
<div class="code"><pre><span class="ln">180</span> public function run()
<span class="ln">181</span> {
<span class="ln">182</span> if($this->hasEventHandler('onBeginRequest'))
<span class="ln">183</span> $this->onBeginRequest(new CEvent($this));
<span class="ln">184</span> register_shutdown_function(array($this,'end'),0,false);
<span class="error"><span class="ln error-ln">185</span> $this->processRequest();
</span><span class="ln">186</span> if($this->hasEventHandler('onEndRequest'))
<span class="ln">187</span> $this->onEndRequest(new CEvent($this));
<span class="ln">188</span> }
<span class="ln">189</span>
<span class="ln">190</span> /**
</pre></div> </td>
</tr>
<tr class="trace app collapsed">
<td class="number">
#15 </td>
<td class="content">
<div class="trace-file">
<div class="plus">+</div>
<div class="minus">–</div>
/media/shnoulle/data/webdev/master/index.php(161): <strong>CApplication</strong>-><strong>run</strong>() </div>
<div class="code"><pre><span class="ln">156</span> require_once APPPATH . 'core/LSYii_Application' . EXT;
<span class="ln">157</span>
<span class="ln">158</span> $config = require_once(APPPATH . 'config/internal' . EXT);
<span class="ln">159</span>
<span class="ln">160</span> Yii::$enableIncludePath = false;
<span class="error"><span class="ln error-ln">161</span> Yii::createApplication('LSYii_Application', $config)->run();
</span><span class="ln">162</span>
<span class="ln">163</span> /* End of file index.php */
<span class="ln">164</span> /* Location: ./index.php */
</pre></div> </td>
</tr>
</tbody></table>
</div>
<div class="version">
2023-11-24 08:48:48 nginx/1.22.1 <a href="https://www.yiiframework.com/">Yii Framework</a>/1.1.28 </div>
</div>
<script type="text/javascript">
/*<![CDATA[*/
var traceReg = new RegExp("(^|\\s)trace-file(\\s|$)");
var collapsedReg = new RegExp("(^|\\s)collapsed(\\s|$)");
var e = document.getElementsByTagName("div");
for(var j=0,len=e.length;j<len;j++){
if(traceReg.test(e[j].className)){
e[j].onclick = function(){
var trace = this.parentNode.parentNode;
if(collapsedReg.test(trace.className))
trace.className = trace.className.replace("collapsed", "expanded");
else
trace.className = trace.className.replace("expanded", "collapsed");
}
}
}
/*]]>*/
</script>
<div id="grammalecte_menu_main_button_shadow_host" style="width: 0px; height: 0px;"></div></body><script src="PHP%20error%20%233_fichiers/api.js"></script></html> | ||||
| Bug heat | 4 | ||||
| Complete LimeSurvey version number (& build) | 6.3.6 | ||||
| I will donate to the project if issue is resolved | No | ||||
| Browser | not relevant | ||||
| Database type & version | not relevant | ||||
| Server OS (if known) | not relevant | ||||
| Webserver software & version (if known) | not relevant | ||||
| PHP Version | 8.1.25 | ||||
|
If confirm : i take it |
|
|
Excel need php-excel vendor update : https://github.com/mk-j/PHP_XLSXWriter/compare/0.38...0.39#diff-73cda01932d82b8ba6580727661d3896943bd63af284c6e50c6e20f8fef835e1R768 PHP error-2.html (26,105 bytes)
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"><head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>PHP error</title>
<style type="text/css">
/*<![CDATA[*/
html,body,div,span,applet,object,iframe,h1,h2,h3,h4,h5,h6,p,blockquote,pre,a,abbr,acronym,address,big,cite,code,del,dfn,em,font,img,ins,kbd,q,s,samp,small,strike,strong,sub,sup,tt,var,b,u,i,center,dl,dt,dd,ol,ul,li,fieldset,form,label,legend,table,caption,tbody,tfoot,thead,tr,th,td{border:0;outline:0;font-size:100%;vertical-align:baseline;background:transparent;margin:0;padding:0;}
body{line-height:1;}
ol,ul{list-style:none;}
blockquote,q{quotes:none;}
blockquote:before,blockquote:after,q:before,q:after{content:none;}
:focus{outline:0;}
ins{text-decoration:none;}
del{text-decoration:line-through;}
table{border-collapse:collapse;border-spacing:0;}
body {
font: normal 9pt "Verdana";
color: #000;
background: #fff;
}
h1 {
font: normal 18pt "Verdana";
color: #f00;
margin-bottom: .5em;
}
h2 {
font: normal 14pt "Verdana";
color: #800000;
margin-bottom: .5em;
}
h3 {
font: bold 11pt "Verdana";
}
pre {
font: normal 11pt Menlo, Consolas, "Lucida Console", Monospace;
}
pre span.error {
display: block;
background: #fce3e3;
}
pre span.ln {
color: #999;
padding-right: 0.5em;
border-right: 1px solid #ccc;
}
pre span.error-ln {
font-weight: bold;
}
.container {
margin: 1em 4em;
}
.version {
color: gray;
font-size: 8pt;
border-top: 1px solid #aaa;
padding-top: 1em;
margin-bottom: 1em;
}
.message {
color: #000;
padding: 1em;
font-size: 11pt;
background: #f3f3f3;
-webkit-border-radius: 10px;
-moz-border-radius: 10px;
border-radius: 10px;
margin-bottom: 1em;
line-height: 160%;
}
.source {
margin-bottom: 1em;
}
.code pre {
background-color: #ffe;
margin: 0.5em 0;
padding: 0.5em;
line-height: 125%;
border: 1px solid #eee;
}
.source .file {
margin-bottom: 1em;
font-weight: bold;
}
.traces {
margin: 2em 0;
}
.trace {
margin: 0.5em 0;
padding: 0.5em;
}
.trace.app {
border: 1px dashed #c00;
}
.trace .number {
text-align: right;
width: 2em;
padding: 0.5em;
}
.trace .content {
padding: 0.5em;
}
.trace .plus,
.trace .minus {
display:inline;
vertical-align:middle;
text-align:center;
border:1px solid #000;
color:#000;
font-size:10px;
line-height:10px;
margin:0;
padding:0 1px;
width:10px;
height:10px;
}
.trace.collapsed .minus,
.trace.expanded .plus,
.trace.collapsed pre {
display: none;
}
.trace-file {
cursor: pointer;
padding: 0.2em;
}
.trace-file:hover {
background: #f0ffff;
}
/*]]>*/
</style>
</head>
<body>
<div class="container">
<h1>PHP error</h1>
<p class="message">
htmlspecialchars(): Passing null to parameter #1 ($string) of type string is deprecated </p>
<div class="source">
<p class="file">/media/shnoulle/data/webdev/master/vendor/mk-j/php_xlsxwriter/xlsxwriter.class.php(760)</p>
<div class="code"><pre><span class="ln">748</span> static $goodchars = ' ';
<span class="ln">749</span> $sheetname = strtr($sheetname, $badchars, $goodchars);
<span class="ln">750</span> $sheetname = function_exists('mb_substr') ? mb_substr($sheetname, 0, 31) : substr($sheetname, 0, 31);
<span class="ln">751</span> $sheetname = trim(trim(trim($sheetname),"'"));//trim before and after trimming single quotes
<span class="ln">752</span> return !empty($sheetname) ? $sheetname : 'Sheet'.((rand()%900)+100);
<span class="ln">753</span> }
<span class="ln">754</span> //------------------------------------------------------------------
<span class="ln">755</span> public static function xmlspecialchars($val)
<span class="ln">756</span> {
<span class="ln">757</span> //note, badchars does not include \t\n\r (\x09\x0a\x0d)
<span class="ln">758</span> static $badchars = "\x00\x01\x02\x03\x04\x05\x06\x07\x08\x0b\x0c\x0e\x0f\x10\x11\x12\x13\x14\x15\x16\x17\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f\x7f";
<span class="ln">759</span> static $goodchars = " ";
<span class="error"><span class="ln error-ln">760</span> return strtr(htmlspecialchars($val, ENT_QUOTES | ENT_XML1), $badchars, $goodchars);//strtr appears to be faster than str_replace
</span><span class="ln">761</span> }
<span class="ln">762</span> //------------------------------------------------------------------
<span class="ln">763</span> public static function array_first_key(array $arr)
<span class="ln">764</span> {
<span class="ln">765</span> reset($arr);
<span class="ln">766</span> $first_key = key($arr);
<span class="ln">767</span> return $first_key;
<span class="ln">768</span> }
<span class="ln">769</span> //------------------------------------------------------------------
<span class="ln">770</span> private static function determineNumberFormatType($num_format)
<span class="ln">771</span> {
<span class="ln">772</span> $num_format = preg_replace("/\[(Black|Blue|Cyan|Green|Magenta|Red|White|Yellow)\]/i", "", $num_format);
</pre></div> </div>
<div class="traces">
<h2>Stack Trace</h2>
<table style="width:100%;">
<tbody><tr class="trace app expanded">
<td class="number">
#0 </td>
<td class="content">
<div class="trace-file">
<div class="plus">+</div>
<div class="minus">–</div>
/media/shnoulle/data/webdev/master/vendor/mk-j/php_xlsxwriter/xlsxwriter.class.php(760): <strong>htmlspecialchars</strong>(null, 19) </div>
<div class="code"><pre><span class="ln">755</span> public static function xmlspecialchars($val)
<span class="ln">756</span> {
<span class="ln">757</span> //note, badchars does not include \t\n\r (\x09\x0a\x0d)
<span class="ln">758</span> static $badchars = "\x00\x01\x02\x03\x04\x05\x06\x07\x08\x0b\x0c\x0e\x0f\x10\x11\x12\x13\x14\x15\x16\x17\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f\x7f";
<span class="ln">759</span> static $goodchars = " ";
<span class="error"><span class="ln error-ln">760</span> return strtr(htmlspecialchars($val, ENT_QUOTES | ENT_XML1), $badchars, $goodchars);//strtr appears to be faster than str_replace
</span><span class="ln">761</span> }
<span class="ln">762</span> //------------------------------------------------------------------
<span class="ln">763</span> public static function array_first_key(array $arr)
<span class="ln">764</span> {
<span class="ln">765</span> reset($arr);
</pre></div> </td>
</tr>
<tr class="trace app expanded">
<td class="number">
#1 </td>
<td class="content">
<div class="trace-file">
<div class="plus">+</div>
<div class="minus">–</div>
/media/shnoulle/data/webdev/master/vendor/mk-j/php_xlsxwriter/xlsxwriter.class.php(613): <strong>XLSXWriter</strong>::<strong>xmlspecialchars</strong>(null) </div>
<div class="code"><pre><span class="ln">608</span> {
<span class="ln">609</span> $app_xml="";
<span class="ln">610</span> $app_xml.='<?xml version="1.0" encoding="UTF-8" standalone="yes"?>'."\n";
<span class="ln">611</span> $app_xml.='<Properties xmlns="http://schemas.openxmlformats.org/officeDocument/2006/extended-properties" xmlns:vt="http://schemas.openxmlformats.org/officeDocument/2006/docPropsVTypes">';
<span class="ln">612</span> $app_xml.='<TotalTime>0</TotalTime>';
<span class="error"><span class="ln error-ln">613</span> $app_xml.='<Company>'.self::xmlspecialchars($this->company).'</Company>';
</span><span class="ln">614</span> $app_xml.='</Properties>';
<span class="ln">615</span> return $app_xml;
<span class="ln">616</span> }
<span class="ln">617</span>
<span class="ln">618</span> protected function buildCoreXML()
</pre></div> </td>
</tr>
<tr class="trace app expanded">
<td class="number">
#2 </td>
<td class="content">
<div class="trace-file">
<div class="plus">+</div>
<div class="minus">–</div>
/media/shnoulle/data/webdev/master/vendor/mk-j/php_xlsxwriter/xlsxwriter.class.php(98): <strong>XLSXWriter</strong>-><strong>buildAppXML</strong>() </div>
<div class="code"><pre><span class="ln">093</span> $zip = new ZipArchive();
<span class="ln">094</span> if (empty($this->sheets)) { self::log("Error in ".__CLASS__."::".__FUNCTION__.", no worksheets defined."); return; }
<span class="ln">095</span> if (!$zip->open($filename, ZipArchive::CREATE)) { self::log("Error in ".__CLASS__."::".__FUNCTION__.", unable to create zip."); return; }
<span class="ln">096</span>
<span class="ln">097</span> $zip->addEmptyDir("docProps/");
<span class="error"><span class="ln error-ln">098</span> $zip->addFromString("docProps/app.xml" , self::buildAppXML() );
</span><span class="ln">099</span> $zip->addFromString("docProps/core.xml", self::buildCoreXML());
<span class="ln">100</span>
<span class="ln">101</span> $zip->addEmptyDir("_rels/");
<span class="ln">102</span> $zip->addFromString("_rels/.rels", self::buildRelationshipsXML());
<span class="ln">103</span>
</pre></div> </td>
</tr>
<tr class="trace app collapsed">
<td class="number">
#3 </td>
<td class="content">
<div class="trace-file">
<div class="plus">+</div>
<div class="minus">–</div>
/media/shnoulle/data/webdev/master/application/helpers/admin/export/ExcelWriter.php(57): <strong>XLSXWriter</strong>-><strong>writeToFile</strong>("/media/shnoulle/data/webdev/master/tmp/4rkyy2rfb4bq9zkfrwgennhs6...") </div>
<div class="code"><pre><span class="ln">52</span> $this->workbook->writeSheetRow($this->currentSheet, $values);
<span class="ln">53</span> }
<span class="ln">54</span>
<span class="ln">55</span> public function close()
<span class="ln">56</span> {
<span class="error"><span class="ln error-ln">57</span> $this->workbook->writeToFile($this->filename);
</span><span class="ln">58</span> if ($this->forceDownload) {
<span class="ln">59</span> header("Content-Type: application/vnd.openxmlformats-officedocument.spreadsheetml.sheet");
<span class="ln">60</span> header("Content-Disposition: attachment; filename=\"{$this->webfilename}.xlsx\"");
<span class="ln">61</span> header('Content-Length: ' . filesize($this->filename));
<span class="ln">62</span> readfile($this->filename);
</pre></div> </td>
</tr>
<tr class="trace app collapsed">
<td class="number">
#4 </td>
<td class="content">
<div class="trace-file">
<div class="plus">+</div>
<div class="minus">–</div>
/media/shnoulle/data/webdev/master/application/helpers/admin/exportresults_helper.php(121): <strong>ExcelWriter</strong>-><strong>close</strong>() </div>
<div class="code"><pre><span class="ln">116</span> $responsesQuery->offset($offset);
<span class="ln">117</span> $responsesQuery->limit($maxRows);
<span class="ln">118</span> $survey->responses = $responsesQuery->query();
<span class="ln">119</span> $writer->write($survey, $sLanguageCode, $oOptions, true);
<span class="ln">120</span> }
<span class="error"><span class="ln error-ln">121</span> $result = $writer->close();
</span><span class="ln">122</span>
<span class="ln">123</span> // Close resultset if needed
<span class="ln">124</span> if ($survey->responses instanceof CDbDataReader) {
<span class="ln">125</span> $survey->responses->close();
<span class="ln">126</span> }
</pre></div> </td>
</tr>
<tr class="trace app collapsed">
<td class="number">
#5 </td>
<td class="content">
<div class="trace-file">
<div class="plus">+</div>
<div class="minus">–</div>
/media/shnoulle/data/webdev/master/application/controllers/admin/Export.php(352): <strong>ExportSurveyResultsService</strong>-><strong>exportResponses</strong>(224146, "en", "xls", FormattingOptions, ...) </div>
<div class="code"><pre><span class="ln">347</span> } else {
<span class="ln">348</span> $sFilter = '';
<span class="ln">349</span> }
<span class="ln">350</span>
<span class="ln">351</span> viewHelper::disableHtmlLogging();
<span class="error"><span class="ln error-ln">352</span> $resultsService->exportResponses($iSurveyID, $explang, $sExportType, $options, $sFilter);
</span><span class="ln">353</span>
<span class="ln">354</span> Yii::app()->end();
<span class="ln">355</span> }
<span class="ln">356</span>
<span class="ln">357</span> /**
</pre></div> </td>
</tr>
<tr class="trace core collapsed">
<td class="number">
#6 </td>
<td class="content">
<div class="trace-file">
unknown(0): <strong>Export</strong>-><strong>exportresults</strong>() </div>
</td>
</tr>
<tr class="trace core collapsed">
<td class="number">
#7 </td>
<td class="content">
<div class="trace-file">
<div class="plus">+</div>
<div class="minus">–</div>
/media/shnoulle/data/webdev/master/vendor/yiisoft/yii/framework/web/actions/CAction.php(114): <strong>ReflectionMethod</strong>-><strong>invokeArgs</strong>(Export, array()) </div>
<div class="code"><pre><span class="ln">109</span> elseif($param->isDefaultValueAvailable())
<span class="ln">110</span> $ps[]=$param->getDefaultValue();
<span class="ln">111</span> else
<span class="ln">112</span> return false;
<span class="ln">113</span> }
<span class="error"><span class="ln error-ln">114</span> $method->invokeArgs($object,$ps);
</span><span class="ln">115</span> return true;
<span class="ln">116</span> }
<span class="ln">117</span> }
</pre></div> </td>
</tr>
<tr class="trace app collapsed">
<td class="number">
#8 </td>
<td class="content">
<div class="trace-file">
<div class="plus">+</div>
<div class="minus">–</div>
/media/shnoulle/data/webdev/master/application/core/SurveyCommonAction.php(83): <strong>CAction</strong>-><strong>runWithParamsInternal</strong>(Export,
ReflectionMethod, array("r" =>
"admin/export/sa/exportresults/surveyid/224146", "sa" =>
"exportresults", "surveyid" => 224146, "iSurveyId" => 224146,
...)) </div>
<div class="code"><pre><span class="ln">78</span> $oMethod = new ReflectionMethod($this, $sDefault);
<span class="ln">79</span> }
<span class="ln">80</span>
<span class="ln">81</span> // We're all good to go, let's execute it
<span class="ln">82</span> // runWithParamsInternal would automatically get the parameters of the method and populate them as required with the params
<span class="error"><span class="ln error-ln">83</span> return parent::runWithParamsInternal($this, $oMethod, $params);
</span><span class="ln">84</span> }
<span class="ln">85</span>
<span class="ln">86</span> /**
<span class="ln">87</span> * Some functions have different parameters, which are just an alias of the
<span class="ln">88</span> * usual parameters we're getting in the url. This function just populates
</pre></div> </td>
</tr>
<tr class="trace core collapsed">
<td class="number">
#9 </td>
<td class="content">
<div class="trace-file">
<div class="plus">+</div>
<div class="minus">–</div>
/media/shnoulle/data/webdev/master/vendor/yiisoft/yii/framework/web/CController.php(308): <strong>SurveyCommonAction</strong>-><strong>runWithParams</strong>(array("r"
=> "admin/export/sa/exportresults/surveyid/224146", "sa" =>
"exportresults", "surveyid" => 224146, "iSurveyId" => 224146,
...)) </div>
<div class="code"><pre><span class="ln">303</span> {
<span class="ln">304</span> $priorAction=$this->_action;
<span class="ln">305</span> $this->_action=$action;
<span class="ln">306</span> if($this->beforeAction($action))
<span class="ln">307</span> {
<span class="error"><span class="ln error-ln">308</span> if($action->runWithParams($this->getActionParams())===false)
</span><span class="ln">309</span> $this->invalidActionParams($action);
<span class="ln">310</span> else
<span class="ln">311</span> $this->afterAction($action);
<span class="ln">312</span> }
<span class="ln">313</span> $this->_action=$priorAction;
</pre></div> </td>
</tr>
<tr class="trace core collapsed">
<td class="number">
#10 </td>
<td class="content">
<div class="trace-file">
<div class="plus">+</div>
<div class="minus">–</div>
/media/shnoulle/data/webdev/master/vendor/yiisoft/yii/framework/web/CController.php(286): <strong>CController</strong>-><strong>runAction</strong>(Export) </div>
<div class="code"><pre><span class="ln">281</span> * @see runAction
<span class="ln">282</span> */
<span class="ln">283</span> public function runActionWithFilters($action,$filters)
<span class="ln">284</span> {
<span class="ln">285</span> if(empty($filters))
<span class="error"><span class="ln error-ln">286</span> $this->runAction($action);
</span><span class="ln">287</span> else
<span class="ln">288</span> {
<span class="ln">289</span> $priorAction=$this->_action;
<span class="ln">290</span> $this->_action=$action;
<span class="ln">291</span> CFilterChain::create($this,$action,$filters)->run();
</pre></div> </td>
</tr>
<tr class="trace core collapsed">
<td class="number">
#11 </td>
<td class="content">
<div class="trace-file">
<div class="plus">+</div>
<div class="minus">–</div>
/media/shnoulle/data/webdev/master/vendor/yiisoft/yii/framework/web/CController.php(265): <strong>CController</strong>-><strong>runActionWithFilters</strong>(Export, array()) </div>
<div class="code"><pre><span class="ln">260</span> {
<span class="ln">261</span> if(($parent=$this->getModule())===null)
<span class="ln">262</span> $parent=Yii::app();
<span class="ln">263</span> if($parent->beforeControllerAction($this,$action))
<span class="ln">264</span> {
<span class="error"><span class="ln error-ln">265</span> $this->runActionWithFilters($action,$this->filters());
</span><span class="ln">266</span> $parent->afterControllerAction($this,$action);
<span class="ln">267</span> }
<span class="ln">268</span> }
<span class="ln">269</span> else
<span class="ln">270</span> $this->missingAction($actionID);
</pre></div> </td>
</tr>
<tr class="trace app collapsed">
<td class="number">
#12 </td>
<td class="content">
<div class="trace-file">
<div class="plus">+</div>
<div class="minus">–</div>
/media/shnoulle/data/webdev/master/application/controllers/AdminController.php(202): <strong>CController</strong>-><strong>run</strong>("export") </div>
<div class="code"><pre><span class="ln">197</span> }
<span class="ln">198</span>
<span class="ln">199</span> $this->runModuleController($action);
<span class="ln">200</span>
<span class="ln">201</span>
<span class="error"><span class="ln error-ln">202</span> return parent::run($action);
</span><span class="ln">203</span> }
<span class="ln">204</span>
<span class="ln">205</span> /**
<span class="ln">206</span> * Starting with LS4, 3rd party developer can extends any of the LimeSurve controllers.
<span class="ln">207</span> *
</pre></div> </td>
</tr>
<tr class="trace core collapsed">
<td class="number">
#13 </td>
<td class="content">
<div class="trace-file">
<div class="plus">+</div>
<div class="minus">–</div>
/media/shnoulle/data/webdev/master/vendor/yiisoft/yii/framework/web/CWebApplication.php(282): <strong>AdminController</strong>-><strong>run</strong>("export") </div>
<div class="code"><pre><span class="ln">277</span> {
<span class="ln">278</span> list($controller,$actionID)=$ca;
<span class="ln">279</span> $oldController=$this->_controller;
<span class="ln">280</span> $this->_controller=$controller;
<span class="ln">281</span> $controller->init();
<span class="error"><span class="ln error-ln">282</span> $controller->run($actionID);
</span><span class="ln">283</span> $this->_controller=$oldController;
<span class="ln">284</span> }
<span class="ln">285</span> else
<span class="ln">286</span> throw new CHttpException(404,Yii::t('yii','Unable to resolve the request "{route}".',
<span class="ln">287</span> array('{route}'=>$route===''?$this->defaultController:$route)));
</pre></div> </td>
</tr>
<tr class="trace core collapsed">
<td class="number">
#14 </td>
<td class="content">
<div class="trace-file">
<div class="plus">+</div>
<div class="minus">–</div>
/media/shnoulle/data/webdev/master/vendor/yiisoft/yii/framework/web/CWebApplication.php(141): <strong>CWebApplication</strong>-><strong>runController</strong>("admin/export/sa/exportresults/surveyid/224146") </div>
<div class="code"><pre><span class="ln">136</span> foreach(array_splice($this->catchAllRequest,1) as $name=>$value)
<span class="ln">137</span> $_GET[$name]=$value;
<span class="ln">138</span> }
<span class="ln">139</span> else
<span class="ln">140</span> $route=$this->getUrlManager()->parseUrl($this->getRequest());
<span class="error"><span class="ln error-ln">141</span> $this->runController($route);
</span><span class="ln">142</span> }
<span class="ln">143</span>
<span class="ln">144</span> /**
<span class="ln">145</span> * Registers the core application components.
<span class="ln">146</span> * This method overrides the parent implementation by registering additional core components.
</pre></div> </td>
</tr>
<tr class="trace core collapsed">
<td class="number">
#15 </td>
<td class="content">
<div class="trace-file">
<div class="plus">+</div>
<div class="minus">–</div>
/media/shnoulle/data/webdev/master/vendor/yiisoft/yii/framework/base/CApplication.php(185): <strong>CWebApplication</strong>-><strong>processRequest</strong>() </div>
<div class="code"><pre><span class="ln">180</span> public function run()
<span class="ln">181</span> {
<span class="ln">182</span> if($this->hasEventHandler('onBeginRequest'))
<span class="ln">183</span> $this->onBeginRequest(new CEvent($this));
<span class="ln">184</span> register_shutdown_function(array($this,'end'),0,false);
<span class="error"><span class="ln error-ln">185</span> $this->processRequest();
</span><span class="ln">186</span> if($this->hasEventHandler('onEndRequest'))
<span class="ln">187</span> $this->onEndRequest(new CEvent($this));
<span class="ln">188</span> }
<span class="ln">189</span>
<span class="ln">190</span> /**
</pre></div> </td>
</tr>
<tr class="trace app collapsed">
<td class="number">
#16 </td>
<td class="content">
<div class="trace-file">
<div class="plus">+</div>
<div class="minus">–</div>
/media/shnoulle/data/webdev/master/index.php(161): <strong>CApplication</strong>-><strong>run</strong>() </div>
<div class="code"><pre><span class="ln">156</span> require_once APPPATH . 'core/LSYii_Application' . EXT;
<span class="ln">157</span>
<span class="ln">158</span> $config = require_once(APPPATH . 'config/internal' . EXT);
<span class="ln">159</span>
<span class="ln">160</span> Yii::$enableIncludePath = false;
<span class="error"><span class="ln error-ln">161</span> Yii::createApplication('LSYii_Application', $config)->run();
</span><span class="ln">162</span>
<span class="ln">163</span> /* End of file index.php */
<span class="ln">164</span> /* Location: ./index.php */
</pre></div> </td>
</tr>
</tbody></table>
</div>
<div class="version">
2023-11-30 17:25:54 nginx/1.22.1 <a href="https://www.yiiframework.com/">Yii Framework</a>/1.1.29 </div>
</div>
<script type="text/javascript">
/*<![CDATA[*/
var traceReg = new RegExp("(^|\\s)trace-file(\\s|$)");
var collapsedReg = new RegExp("(^|\\s)collapsed(\\s|$)");
var e = document.getElementsByTagName("div");
for(var j=0,len=e.length;j<len;j++){
if(traceReg.test(e[j].className)){
e[j].onclick = function(){
var trace = this.parentNode.parentNode;
if(collapsedReg.test(trace.className))
trace.className = trace.className.replace("collapsed", "expanded");
else
trace.className = trace.className.replace("expanded", "collapsed");
}
}
}
/*]]>*/
</script>
<div id="grammalecte_menu_main_button_shadow_host" style="width: 0px; height: 0px;"></div></body><script src="PHP%20error_fichiers/api.js"></script></html> |
|
|
Tested and merged. |
|
|
Fix committed to master branch: http://bugs.limesurvey.org/plugin.php?page=Source/view&id=35835 |
|
|
LimeSurvey: master 2a7d4252 2023-12-11 17:38 Committer: GitHub Details Diff |
Fixed issue 19277: When export to CSV - multiple PHP error with debug and php8.1 (03651) |
Affected Issues 19277 |
|
| mod - application/helpers/admin/export/CsvWriter.php | Diff File | ||
| mod - application/helpers/admin/export/SurveyObj.php | Diff File | ||
| mod - application/helpers/admin/exportresults_helper.php | Diff File | ||
| Date Modified | Username | Field | Change |
|---|---|---|---|
| 2023-11-24 08:57 | DenisChenu | New Issue | |
| 2023-11-24 08:57 | DenisChenu | File Added: PHP error.html | |
| 2023-11-24 08:57 | DenisChenu | File Added: PHP error #2.html | |
| 2023-11-24 08:57 | DenisChenu | File Added: PHP error #3.html | |
| 2023-11-24 08:57 | DenisChenu | File Added: survey_archive_282267.lsa | |
| 2023-11-24 08:57 | DenisChenu | Note Added: 78704 | |
| 2023-11-24 08:57 | DenisChenu | Bug heat | 0 => 2 |
| 2023-11-27 21:29 | gabrieljenik | Assigned To | => DenisChenu |
| 2023-11-27 21:29 | gabrieljenik | Status | new => assigned |
| 2023-11-30 17:19 | DenisChenu | Summary | When export : multiple PHP error with debug and php8.1 => When export to CSV : multiple PHP error with debug and php8.1 |
| 2023-11-30 17:31 | DenisChenu | Note Added: 78845 | |
| 2023-11-30 17:31 | DenisChenu | File Added: PHP error-2.html | |
| 2023-11-30 17:41 | DenisChenu | Note Added: 78846 | |
| 2023-11-30 17:41 | DenisChenu | Assigned To | DenisChenu => gabrieljenik |
| 2023-11-30 17:41 | DenisChenu | Status | assigned => ready for code review |
| 2023-11-30 21:04 | gabrieljenik | Assigned To | gabrieljenik => tibor.pacalat |
| 2023-11-30 21:04 | gabrieljenik | Status | ready for code review => ready for testing |
| 2023-12-11 16:39 | tibor.pacalat | Status | ready for testing => resolved |
| 2023-12-11 16:39 | tibor.pacalat | Resolution | open => fixed |
| 2023-12-11 16:39 | tibor.pacalat | Note Added: 78945 | |
| 2023-12-11 16:39 | tibor.pacalat | Bug heat | 2 => 4 |
| 2023-12-11 16:57 | DenisChenu | Changeset attached | => LimeSurvey master 2a7d4252 |
| 2023-12-11 16:57 | DenisChenu | Note Added: 78948 | |
| 2023-12-11 16:57 | DenisChenu | Assigned To | tibor.pacalat => DenisChenu |
| 2024-11-19 18:14 | c_schmitz | Status | resolved => closed |