LimeSurvey issue tracker
Registration

View Issue Details Jump to Notes ] Related Changesets ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
08409Bug reports[User patches] Other issuespublic2013-11-26 12:112013-12-09 15:23
Reporterphilg 
Assigned ToDenisChenu 
PrioritynormalSeverityminor 
StatusclosedResolutionfixed 
Product Version 
Target VersionFixed in Version2.05+ 
Summary08409: no zéro trim if value of numeric field is "0"
DescriptionOn last 2.05 version
In a numeric field, if user put the zéro value, the result is not save because the function do_numerical in the file application/helpers/qanda_helper.php do a ltrim in the line 3436.

to resolve this just replace the line 3436
$fValue = ltrim($fValue,"0");
by
if($fValue !='0'){
   $fValue = ltrim($fValue,"0");
}
I will donate to the project if issue is resolved within 48 hrs
LimeSurvey build number OR git commit ID7173836423f4f5ea37d68c5137a7
Browser
Database & DB-Version
Operating System (Server)
Webserver software & version
PHP Version
Attached Files

- Relationships

-  Notes
User avatar (27408)
DenisChenu (developer)
2013-11-26 15:34

Carsten : do_numericla is the only one who use ltrim.rtrim.
Other don't use it .

Is it really needed ?

It was in 1.92 too.
User avatar (27428)
DenisChenu (developer)
2013-11-27 15:14

Fix committed to 2.05 branch: http://bugs.limesurvey.org/plugin.php?page=Source/view&id=13519 [^]
User avatar (27429)
DenisChenu (developer)
2013-11-27 15:16

Thanks philg,

I just remove the ltrim. Not needed. Just keep rtrim due to DECIMAL in SQL.
User avatar (27528)
c_schmitz (administrator)
2013-12-09 15:23

2.05 Build 131209 released.

- Related Changesets
LimeSurvey: 2.05 083a1964
Timestamp: 2013-11-27 14:14:27
Author: DenisChenu
Committer: Denis Chenu
Details ] Diff ]
Fixed issue 08409: no zéro trim if value of numeric field is "0"
Dev: only need to remove last 0 after dot due to decimal SQL
Dev: maybe better to do it elsewhere for 2.1 question plugins
mod - application/helpers/qanda_helper.php Diff ] File ]

- Issue History
Date Modified Username Field Change
2013-11-26 12:11 philg New Issue
2013-11-26 12:29 c_schmitz Assigned To => DenisChenu
2013-11-26 12:29 c_schmitz Status new => assigned
2013-11-26 15:34 DenisChenu Note Added: 27408
2013-11-27 15:14 DenisChenu Changeset attached => LimeSurvey 2.05 083a1964
2013-11-27 15:14 DenisChenu Note Added: 27428
2013-11-27 15:14 DenisChenu Resolution open => fixed
2013-11-27 15:15 DenisChenu Project User patches => Bug reports
2013-11-27 15:15 DenisChenu Category Data Entry (non public) => Other issues
2013-11-27 15:16 DenisChenu Note Added: 27429
2013-11-27 15:16 DenisChenu Status assigned => resolved
2013-11-27 15:16 DenisChenu Fixed in Version => 2.05+
2013-12-09 15:23 c_schmitz Note Added: 27528
2013-12-09 15:23 c_schmitz Status resolved => closed


Copyright © 2000 - 2014 MantisBT Team
Powered by Mantis Bugtracker