View Issue Details

This issue affects 1 person(s).
 6
IDProjectCategoryView StatusLast Update
04236Bug reportsConditionspublic2010-09-07 17:36
Reportertemp Assigned Tojcleeland  
PrioritynormalSeverityminor 
Status closedResolutionunable to reproduce 
Product Version1.87+ 
Summary04236: the new behaviours of array_filter
Description

Somewhere between 187plus-build8227 and build8498 the behaviour of array_filter changed.

This occurs only when I select nothing in the original "model" multiple choice question.

If I choose one or more choices, then the both the include and exclude array filters work fine on subsequent questions.

But if I choose nothing at all from the original question, the filters don't work at all. Even if I use the include filter, all the choices appear. If I use the exclude filter, none of the choices appear, even tho they should all appear.

I traced it down to two lines in the php code:

qanda.php
line 1254:
new: if (!empty($selected) && !in_array($ansrow['code'],$selected))
old: if (!in_array($ansrow['code'],$selected))

and
line 1312
new: if (!empty($selected) && !in_array($ansrow['code'],$selected))
old: if (!in_array($ansrow['code'],$selected))

If I remove the empty($selected) check, it works as I expect.

Steps To Reproduce

Use a multiple choice questions for array)filter, and choose nothing in the multiple-choice question. All following questions filtering on that orginal question don't work properly.

TagsNo tags attached.
Bug heat6
Complete LimeSurvey version number (& build)8498
I will donate to the project if issue is resolved
Browser
Database type & versiondoesn't matter
Server OS (if known)linux
Webserver software & version (if known)apache
PHP Versionnot sure
Git branch / Pull Request URL

Users monitoring this issue

There are no users monitoring this issue.

Activities

jcleeland

jcleeland

2010-08-04 12:17

reporter   ~12547

This does not appear to be a problem in 1.90, can anyone confirm?

Mazi

Mazi

2010-08-05 00:09

updater   ~12560

Can you attach a sample survey so we can try to reproduce the problem?

c_schmitz

c_schmitz

2010-09-06 00:04

administrator   ~12760

temp, please attach a sample survey - otherwise the issue will be closed because we cannot reproduce.

Issue History

Date Modified Username Field Change
2010-03-23 16:55 temp New Issue
2010-03-23 20:24 c_schmitz Status new => assigned
2010-03-23 20:24 c_schmitz Assigned To => jcleeland
2010-08-04 12:17 jcleeland Note Added: 12547
2010-08-05 00:09 Mazi Note Added: 12560
2010-08-05 00:09 Mazi Status assigned => feedback
2010-09-06 00:04 c_schmitz Note Added: 12760
2010-09-07 17:36 c_schmitz Status feedback => closed
2010-09-07 17:36 c_schmitz Resolution open => unable to reproduce