View Issue Details

This bug affects 1 person(s).
 4
IDProjectCategoryView StatusLast Update
05675Bug reportsOtherpublic2012-03-14 21:08
Reporteruser16048Assigned Toc_schmitz  
PrioritynormalSeverityminor 
Status closedResolutionfixed 
Product Version1.92RC2 
Fixed in Version1.92RC4 
Summary05675: Warning when using wrong formated validation
Description

The EM seems to throw a warning if you enter "abcde" as a validation,for example for a short text question and then test the survey.

Warning: preg_match() [function.preg-match]: Delimiter must not be alphanumeric or backslash in D:\Apache\htdocs\limesurveyEM\classes\eval\ExpressionManager.php on line 3146

Steps To Reproduce

Import the question from the attachment and try to test the survey.

TagsNo tags attached.
Attached Files
Bug heat4
Complete LimeSurvey version number (& build)12106
I will donate to the project if issue is resolvedNo
BrowserMozilla Firefox 9.0
Database type & versionMySQL Community Server 5.5.8
Server OS (if known)Windows Server 2008 R2 Standard
Webserver software & version (if known)Apache 2.2.17
PHP Version5.2.17

Users monitoring this issue

There are no users monitoring this issue.

Activities

TMSWhite

TMSWhite

2012-01-20 15:38

reporter   ~16847

Carsten-

This is a limitation of preg in all versions. LS would need to validate the preg equation on save and report an error if it is invalid.

I don't have time for this one.

/Tom

TMSWhite

TMSWhite

2012-01-31 03:02

reporter   ~17098

Carsten-

Thanks for tackling this. However, wouldn't it be better to show an error message somewhere (like on the Question view page) if there is a preg validation error? Otherwise the end-user may see a run-time error that the author does not see.

/Tom

c_schmitz

c_schmitz

2012-01-31 09:33

administrator   ~17100

Last edited: 2012-01-31 09:35

It is a warning which cannot be catched by an exception handler - only muted (which I did). There is also no easy way to validate the regex on save.
Most applications I know handle it the way that the invalid regex is accepted and then just won't match. So if a similar warning should show up during survey taking the easiest thing is to suppress that one, too.

c_schmitz

c_schmitz

2012-02-14 14:10

administrator   ~17437

1.92RC4 released

Related Changesets

LimeSurvey: Yii 7a00bf54

2012-01-30 16:47:37

c_schmitz

Details Diff
Fixed issue 05675: Warning when using wrong formatted validation

git-svn-id: file:///Users/Shitiz/Downloads/lssvn/source/limesurvey_yii@12263 b72ed6b6-b9f8-46b5-92b4-906544132732
Affected Issues
05675
mod - application/helpers/expressions/em_core_helper.php Diff File

Issue History

Date Modified Username Field Change
2012-01-19 12:06 user16048 New Issue
2012-01-19 12:06 user16048 File Added: limesurvey_question_2123.lsq
2012-01-19 16:35 Mazi Assigned To => TMSWhite
2012-01-19 16:35 Mazi Status new => assigned
2012-01-20 15:38 TMSWhite Note Added: 16847
2012-01-20 15:38 TMSWhite Assigned To TMSWhite => c_schmitz
2012-01-20 15:38 TMSWhite Status assigned => feedback
2012-01-31 01:43 c_schmitz Status feedback => assigned
2012-01-31 01:46 c_schmitz Status assigned => resolved
2012-01-31 01:46 c_schmitz Fixed in Version => 1.92RC4
2012-01-31 01:46 c_schmitz Resolution open => fixed
2012-01-31 03:02 TMSWhite Note Added: 17098
2012-01-31 09:33 c_schmitz Note Added: 17100
2012-01-31 09:34 c_schmitz Note Edited: 17100
2012-01-31 09:35 c_schmitz Note Edited: 17100
2012-02-14 14:10 c_schmitz Note Added: 17437
2012-02-14 14:10 c_schmitz Status resolved => closed
2012-03-14 21:08 c_schmitz Changeset attached => Import 2012-03-09 13:30:34 Yii 7a00bf54