View Issue Details

This bug affects 1 person(s).
 4
IDProjectCategoryView StatusLast Update
11442Bug reportsSurvey takingpublic2016-07-14 15:42
ReporterDenisChenu Assigned Toollehar  
PrioritynoneSeverityminor 
Status closedResolutionfixed 
Product Version2.50.x 
Fixed in Version2.50.x 
Summary11442: Illegal offset type in isset or empty
Description

When entering in a survey :
Illegal offset type in isset or empty
./LimeSurvey/framework/web/CClientScript.php(574)

Steps To Reproduce

Enter a survey (all survey) in public mode

Additional Information

Seems to be after this : https://github.com/LimeSurvey/LimeSurvey/pull/518

TagsNo tags attached.
Attached Files
PHP warning.html (18,668 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 warning</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>
<style type="text/css">:root #content > #right > .dose > .dosesingle,
:root #content > #center > .dose > .dosesingle,
:root .container > .infoBoxList > .shareInfoBox
{display:none !important;}</style></head>

<body>
<div class="container">
	<h1>PHP warning</h1>

	<p class="message">
		simplexml_load_file(): I/O warning : failed to load external entity &amp;quot;&amp;quot;	</p>

	<div class="source">
		<p class="file">/home/sondages.pro/htdocs/limesurvey_GIT/testing/masterall/application/models/TemplateConfiguration.php(113)</p>
		<div class="code"><pre><span class="ln">101</span>             else
<span class="ln">102</span>             {
<span class="ln">103</span>                 $this-&gt;path = Yii::app()-&gt;getConfig("standardtemplaterootdir").DIRECTORY_SEPARATOR.$this-&gt;sTemplateName;
<span class="ln">104</span>                 $this-&gt;xmlFile = $this-&gt;path.DIRECTORY_SEPARATOR.'config.xml';
<span class="ln">105</span>             }
<span class="ln">106</span> 
<span class="ln">107</span>         }
<span class="ln">108</span>         else
<span class="ln">109</span>         {
<span class="ln">110</span>             $this-&gt;xmlFile = $this-&gt;path.DIRECTORY_SEPARATOR.'config.xml';
<span class="ln">111</span>         }
<span class="ln">112</span>         //var_dump(realpath ($this-&gt;xmlFile)); die();
<span class="error"><span class="ln error-ln">113</span>         $this-&gt;config = simplexml_load_file(realpath ($this-&gt;xmlFile));
</span><span class="ln">114</span> 
<span class="ln">115</span>         // The template configuration.
<span class="ln">116</span>         $this-&gt;viewPath = $this-&gt;path.DIRECTORY_SEPARATOR.$this-&gt;config-&gt;engine-&gt;pstpldirectory.DIRECTORY_SEPARATOR;
<span class="ln">117</span>         $this-&gt;siteLogo = (isset($this-&gt;config-&gt;files-&gt;logo))?$this-&gt;config-&gt;files-&gt;logo-&gt;filename:'';
<span class="ln">118</span> 
<span class="ln">119</span>         // condition for user's template prior to 160219
<span class="ln">120</span>         $this-&gt;filesPath    = (isset($this-&gt;config-&gt;engine-&gt;filesdirectory))? $this-&gt;path.DIRECTORY_SEPARATOR.$this-&gt;config-&gt;engine-&gt;filesdirectory.DIRECTORY_SEPARATOR : $this-&gt;path . '/files/';
<span class="ln">121</span>         // condition for user's template prior to 160504
<span class="ln">122</span>         $this-&gt;overwrite_question_views    = (isset($this-&gt;config-&gt;engine-&gt;overwrite_question_views))? $this-&gt;config-&gt;engine-&gt;overwrite_question_views=='true' : false;
<span class="ln">123</span> 
<span class="ln">124</span>         $this-&gt;cssFramework = $this-&gt;config-&gt;engine-&gt;cssframework;
<span class="ln">125</span>         $this-&gt;packages     = (array) $this-&gt;config-&gt;engine-&gt;packages-&gt;package;
</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>
										&nbsp;/home/sondages.pro/htdocs/limesurvey_GIT/testing/masterall/application/models/TemplateConfiguration.php(113): <strong>simplexml_load_file</strong>("")				</div>

				<div class="code"><pre><span class="ln">108</span>         else
<span class="ln">109</span>         {
<span class="ln">110</span>             $this-&gt;xmlFile = $this-&gt;path.DIRECTORY_SEPARATOR.'config.xml';
<span class="ln">111</span>         }
<span class="ln">112</span>         //var_dump(realpath ($this-&gt;xmlFile)); die();
<span class="error"><span class="ln error-ln">113</span>         $this-&gt;config = simplexml_load_file(realpath ($this-&gt;xmlFile));
</span><span class="ln">114</span> 
<span class="ln">115</span>         // The template configuration.
<span class="ln">116</span>         $this-&gt;viewPath = $this-&gt;path.DIRECTORY_SEPARATOR.$this-&gt;config-&gt;engine-&gt;pstpldirectory.DIRECTORY_SEPARATOR;
<span class="ln">117</span>         $this-&gt;siteLogo = (isset($this-&gt;config-&gt;files-&gt;logo))?$this-&gt;config-&gt;files-&gt;logo-&gt;filename:'';
<span class="ln">118</span> 
</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>
										&nbsp;/home/sondages.pro/htdocs/limesurvey_GIT/testing/masterall/application/models/Template.php(140): <strong>TemplateConfiguration</strong>-&gt;<strong>setTemplateConfiguration</strong>("skeleton", "")				</div>

				<div class="code"><pre><span class="ln">135</span>      * @return StdClass
<span class="ln">136</span>      */
<span class="ln">137</span>     public static function getTemplateConfiguration($sTemplateName='', $iSurveyId='')
<span class="ln">138</span>     {
<span class="ln">139</span>         $oTemplate = new TemplateConfiguration;
<span class="error"><span class="ln error-ln">140</span>         $oTemplate-&gt;setTemplateConfiguration($sTemplateName, $iSurveyId);
</span><span class="ln">141</span>         return $oTemplate;
<span class="ln">142</span>     }
<span class="ln">143</span> 
<span class="ln">144</span>     /**
<span class="ln">145</span>      * Return the list of ALL files present in the file directory
</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>
										&nbsp;/home/sondages.pro/htdocs/limesurvey_GIT/testing/masterall/application/models/Template.php(295): <strong>Template</strong>::<strong>getTemplateConfiguration</strong>("skeleton", "")				</div>

				<div class="code"><pre><span class="ln">290</span>      */
<span class="ln">291</span>     public static function getInstance($sTemplateName='', $iSurveyId='')
<span class="ln">292</span>     {
<span class="ln">293</span>         if (empty(self::$instance))
<span class="ln">294</span>         {
<span class="error"><span class="ln error-ln">295</span>             self::$instance = self::getTemplateConfiguration($sTemplateName, $iSurveyId);
</span><span class="ln">296</span>         }
<span class="ln">297</span>         return self::$instance;
<span class="ln">298</span>     }
<span class="ln">299</span> 
<span class="ln">300</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>
										&nbsp;/home/sondages.pro/htdocs/limesurvey_GIT/testing/masterall/application/controllers/AdminController.php(55): <strong>Template</strong>::<strong>getInstance</strong>("skeleton")				</div>

				<div class="code"><pre><span class="ln">50</span>         if (!Yii::app()-&gt;getConfig("action")) {Yii::app()-&gt;setConfig("action", returnGlobal('action'));}          //Desired action
<span class="ln">51</span>         if (!Yii::app()-&gt;getConfig("subaction")) {Yii::app()-&gt;setConfig("subaction", returnGlobal('subaction'));} //Desired subaction
<span class="ln">52</span>         if (!Yii::app()-&gt;getConfig("editedaction")) {Yii::app()-&gt;setConfig("editedaction", returnGlobal('editedaction'));} // for html editor integration
<span class="ln">53</span> 
<span class="ln">54</span>         // Variable not used, but keep it here so the object is initialized at the right place.
<span class="error"><span class="ln error-ln">55</span>         $oTemplate = Template::model()-&gt;getInstance(Yii::app()-&gt;getConfig("defaulttemplate"));
</span><span class="ln">56</span>         $oAdmintheme = new AdminTheme; 
<span class="ln">57</span>         $oAdmintheme-&gt;setAdminTheme();
<span class="ln">58</span>     }
<span class="ln">59</span> 
<span class="ln">60</span>     /**
</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>
										&nbsp;/home/sondages.pro/htdocs/limesurvey_GIT/testing/masterall/application/core/LSYii_Controller.php(42): <strong>AdminController</strong>-&gt;<strong>_init</strong>()				</div>

				<div class="code"><pre><span class="ln">37</span>         // This will setConfig from database
<span class="ln">38</span>         $this-&gt;loadHelper('globalsettings');
<span class="ln">39</span>         $this-&gt;loadHelper('common');
<span class="ln">40</span>         $this-&gt;loadHelper('expressions.em_manager');
<span class="ln">41</span>         $this-&gt;loadHelper('replacements');
<span class="error"><span class="ln error-ln">42</span>         $this-&gt;_init();
</span><span class="ln">43</span>     }
<span class="ln">44</span> 
<span class="ln">45</span>     /**
<span class="ln">46</span>      * Check that installation was already done by looking for config.php
<span class="ln">47</span>      * Will redirect to the installer script if not exists.
</pre></div>			</td>
		</tr>
						<tr class="trace core collapsed">
			<td class="number">
				#5			</td>
			<td class="content">
				<div class="trace-file">
											<div class="plus">+</div>
						<div class="minus">–</div>
										&nbsp;/home/sondages.pro/htdocs/limesurvey_GIT/testing/masterall/framework/web/CWebApplication.php(359): <strong>LSYii_Controller</strong>-&gt;<strong>__construct</strong>("admin", null)				</div>

				<div class="code"><pre><span class="ln">354</span>                     require($classFile);
<span class="ln">355</span>                 if(class_exists($className,false) &amp;&amp; is_subclass_of($className,'CController'))
<span class="ln">356</span>                 {
<span class="ln">357</span>                     $id[0]=strtolower($id[0]);
<span class="ln">358</span>                     return array(
<span class="error"><span class="ln error-ln">359</span>                         new $className($controllerID.$id,$owner===$this?null:$owner),
</span><span class="ln">360</span>                         $this-&gt;parseActionParams($route),
<span class="ln">361</span>                     );
<span class="ln">362</span>                 }
<span class="ln">363</span>                 return null;
<span class="ln">364</span>             }
</pre></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>
										&nbsp;/home/sondages.pro/htdocs/limesurvey_GIT/testing/masterall/framework/web/CWebApplication.php(276): <strong>CWebApplication</strong>-&gt;<strong>createController</strong>("admin")				</div>

				<div class="code"><pre><span class="ln">271</span>      * @param string $route the route of the current request. See {@link createController} for more details.
<span class="ln">272</span>      * @throws CHttpException if the controller could not be created.
<span class="ln">273</span>      */
<span class="ln">274</span>     public function runController($route)
<span class="ln">275</span>     {
<span class="error"><span class="ln error-ln">276</span>         if(($ca=$this-&gt;createController($route))!==null)
</span><span class="ln">277</span>         {
<span class="ln">278</span>             list($controller,$actionID)=$ca;
<span class="ln">279</span>             $oldController=$this-&gt;_controller;
<span class="ln">280</span>             $this-&gt;_controller=$controller;
<span class="ln">281</span>             $controller-&gt;init();
</pre></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>
										&nbsp;/home/sondages.pro/htdocs/limesurvey_GIT/testing/masterall/framework/web/CWebApplication.php(141): <strong>CWebApplication</strong>-&gt;<strong>runController</strong>("admin")				</div>

				<div class="code"><pre><span class="ln">136</span>             foreach(array_splice($this-&gt;catchAllRequest,1) as $name=&gt;$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-&gt;getUrlManager()-&gt;parseUrl($this-&gt;getRequest());
<span class="error"><span class="ln error-ln">141</span>         $this-&gt;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">
				#8			</td>
			<td class="content">
				<div class="trace-file">
											<div class="plus">+</div>
						<div class="minus">–</div>
										&nbsp;/home/sondages.pro/htdocs/limesurvey_GIT/testing/masterall/framework/base/CApplication.php(185): <strong>CWebApplication</strong>-&gt;<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-&gt;hasEventHandler('onBeginRequest'))
<span class="ln">183</span>             $this-&gt;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-&gt;processRequest();
</span><span class="ln">186</span>         if($this-&gt;hasEventHandler('onEndRequest'))
<span class="ln">187</span>             $this-&gt;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">
				#9			</td>
			<td class="content">
				<div class="trace-file">
											<div class="plus">+</div>
						<div class="minus">–</div>
										&nbsp;/home/sondages.pro/htdocs/limesurvey_GIT/testing/masterall/index.php(212): <strong>CApplication</strong>-&gt;<strong>run</strong>()				</div>

				<div class="code"><pre><span class="ln">207</span>         die (sprintf('%s should be writable by the webserver (766 or 776).', $runtimePath));
<span class="ln">208</span>     }
<span class="ln">209</span> }
<span class="ln">210</span> 
<span class="ln">211</span> Yii::$enableIncludePath = false;
<span class="error"><span class="ln error-ln">212</span> Yii::createApplication('LSYii_Application', $config)-&gt;run();
</span><span class="ln">213</span> 
<span class="ln">214</span> /* End of file index.php */
<span class="ln">215</span> /* Location: ./index.php */
</pre></div>			</td>
		</tr>
				</tbody></table>
	</div>

	<div class="version">
		2016-05-08 16:21:37 Apache/2.2.22 (Debian) <a href="http://www.yiiframework.com/">Yii Framework</a>/1.1.17	</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>



</body></html>
PHP warning.html (18,668 bytes)   
Bug heat4
Complete LimeSurvey version number (& build)160710
I will donate to the project if issue is resolvedNo
Browsernot relevant
Database type & versionnot relevant
Server OS (if known)not relevant
Webserver software & version (if known)not relevant
PHP Versionnot relevant

Users monitoring this issue

There are no users monitoring this issue.

Activities

DenisChenu

DenisChenu

2016-07-10 11:22

developer   ~39862

CClientScript->registerPackage(SimpleXMLElement) ????

c_schmitz

c_schmitz

2016-07-14 15:42

administrator   ~39882

Version 2.50 Build 160714 released

Related Changesets

LimeSurvey: master c6319e19

2016-07-11 14:23:23

ollehar

Details Diff
Dev: Cast XML object to string to avoid PHP warning Affected Issues
11442, 11443
mod - application/controllers/survey/index.php Diff File

Issue History

Date Modified Username Field Change
2016-07-10 11:21 DenisChenu New Issue
2016-07-10 11:21 DenisChenu Status new => assigned
2016-07-10 11:21 DenisChenu Assigned To => LouisGac
2016-07-10 11:21 DenisChenu File Added: PHP warning.html
2016-07-10 11:22 DenisChenu Note Added: 39862
2016-07-11 16:31 DenisChenu Assigned To LouisGac => ollehar
2016-07-11 16:32 DenisChenu Changeset attached => LimeSurvey master c6319e19
2016-07-11 16:32 DenisChenu Status assigned => resolved
2016-07-11 16:32 DenisChenu Fixed in Version => 2.5
2016-07-11 16:32 DenisChenu Resolution open => fixed
2016-07-14 15:42 c_schmitz Note Added: 39882
2016-07-14 15:42 c_schmitz Status resolved => closed