View Issue Details

This bug affects 1 person(s).
 4
IDProjectCategoryView StatusLast Update
09242Bug reportsExpression Managerpublic2016-11-13 17:22
ReporterDenisChenu Assigned Tomarkusfluer 
PrioritynormalSeverityminor 
Status closedResolutionfixed 
Product Version2.05+ 
Fixed in Version2.50.x 
Summary09242: PHP and JS difference with numeric value starting by 0
Description

There are difference in JS and PHP with numeric String starting by 0

Steps To Reproduce

Import survey included : 1, 2000, A1 and A2 is OK. But not 0200

Additional Information

Use a new function is_decimal can clean up this.
But in
PHP : 12345678901234567890.1234567890 + 1 = 1.2345678901235E+19
javascript : 12345678901234567890.1234567890 + 1= 12345678901234567000

Do only sum/substraction etc ... if 2 vars is float else concat.

TagsNo tags attached.
Attached Files
Bug heat4
Complete LimeSurvey version number (& build)140922
I will donate to the project if issue is resolvedNo
BrowserFF32
Database type & versionMysql 5
Server OS (if known)debian/linux
Webserver software & version (if known)apache
PHP VersionPHP Version 5.4.4

Relationships

parent of 11620 closedmarkusfluer Validation equation bug 
related to 11894 closedmarkusfluer Regex validation not working as expected when leading zeros are present in short text questions 

Users monitoring this issue

There are no users monitoring this issue.

Activities

markusfluer

markusfluer

2016-08-01 18:36

administrator   ~40154

Fix committed to master branch: http://bugs.limesurvey.org/plugin.php?page=Source/view&id=19897

c_schmitz

c_schmitz

2016-08-05 11:08

administrator   ~40180

Version 2.50 Build 160804 released

Related Changesets

LimeSurvey: master 8d456e1d

2016-08-01 16:36:12

markusfluer

Details Diff
Fixed issue 09242: PHP and JS difference with numeric value starting by 0
Dev: used the new decimal library to parse floats and return them
Affected Issues
09242
mod - scripts/expressions/em_javascript.js Diff File

Issue History

Date Modified Username Field Change
2014-09-22 18:53 DenisChenu New Issue
2014-09-22 18:53 DenisChenu File Added: limesurvey_survey_phpjs.lss
2016-08-01 16:18 markusfluer Assigned To => markusfluer
2016-08-01 16:18 markusfluer Status new => assigned
2016-08-01 18:36 markusfluer Status assigned => resolved
2016-08-01 18:36 markusfluer Fixed in Version => 2.5
2016-08-01 18:36 markusfluer Resolution open => fixed
2016-08-01 18:36 markusfluer Changeset attached => LimeSurvey master 8d456e1d
2016-08-01 18:36 markusfluer Note Added: 40154
2016-08-05 11:08 c_schmitz Note Added: 40180
2016-08-05 11:08 c_schmitz Status resolved => closed
2016-09-03 18:45 DenisChenu Relationship added parent of 11620
2016-11-13 17:22 DenisChenu Relationship added related to 11894