View Issue Details

IDProjectCategoryView StatusLast Update
13630Bug reports[All Projects] Expression Managerpublic2018-06-12 18:31
ReporterDenisChenuAssigned Todominikvitt 
Status assignedResolutionopen 
Product Version3.7.x 
Target VersionFixed in Version 
Summary13630: EM send Notice about Undefined offset

In some condition : EM send Undefined offset : 1

Steps To Reproduce

Import included survey
Set debug=2
Check logic

Additional Information

The strangest issue : why we don't have this issue before (2.73 have same issue) ?

Replace line by if (empty($errs[$errIndex++][1][1])) { send a Array to string conversion at $stringParts[] = "span title='".implode('; ', $messages)."' class='em-error'";

Then $messages are array of array ?

TagsNo tags attached.
Complete LimeSurvey version number (& build)3.7.0 git
I will donate to the project if issue is resolvedNo
Browsernot relevant
Database & DB-Versionnot relevant
Operating System (Server)not relevant
Webserver software & versionnot relevant
PHP Versionnot relevant




2018-04-24 12:07


limesurvey_survey_EMnotice.lss (18,329 bytes)
PHP notice.html (23,306 bytes)
PHP notice_survey.html (26,017 bytes)


2018-04-24 12:20

developer   ~47510

Have the fix but … unsure it's a real fix … em core are so … complicated …



2018-05-23 10:57

manager   ~47729

could be related to PHP 7 maybe?

PHP 7.1:
The empty index operator is not supported for strings anymore
Applying the empty index operator to a string (e.g. $str[] = $x) throws a fatal error instead of converting silently to array.



2018-06-11 11:04

developer   ~48039

Last edited: 2018-06-11 11:05

View 2 revisions

No, i'm on php 5.6 :) . and undefined offset is not related to PHP version.

Quick fix : if(empty($errs[$errIndex++][1][1])) : show better the issue, must be a string and it's an aray:

I think there are an issue about an array_merge VS array_push somewhere (real fix)



2018-06-12 18:31

developer   ~48069

It looks that Equation you wrote in 4th question isn't accepted by EM, probably IF part.
Are you sure that equation is correct?

Issue History

Date Modified Username Field Change
2018-04-24 12:07 DenisChenu New Issue
2018-04-24 12:07 DenisChenu File Added: limesurvey_survey_EMnotice.lss
2018-04-24 12:07 DenisChenu File Added: PHP notice.html
2018-04-24 12:07 DenisChenu File Added: PHP notice_survey.html
2018-04-24 12:20 DenisChenu Note Added: 47510
2018-05-23 10:57 LouisGac Note Added: 47729
2018-06-11 10:38 LouisGac Assigned To => dominikvitt
2018-06-11 10:38 LouisGac Status new => assigned
2018-06-11 11:04 DenisChenu Note Added: 48039
2018-06-11 11:05 DenisChenu Note Edited: 48039 View Revisions
2018-06-12 18:31 dominikvitt Note Added: 48069