View Issue Details

IDProjectCategoryView StatusLast Update
08409Bug reports[User patches] Other issuespublic2013-12-09 15:23
Reporterphilg 
Assigned ToDenisChenu 
PrioritynormalSeverityminor 
Status closedResolutionfixed 
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");
}
TagsNo tags attached.
Complete LimeSurvey version number (& build)7173836423f4f5ea37d68c5137a7
I will donate to the project if issue is resolved
Browser
Database & DB-Version
Operating System (Server)
Webserver software & version
PHP Version

Relationships

Activities

DenisChenu

2013-11-26 15:34

developer   ~27408

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.

DenisChenu

2013-11-27 15:14

developer   ~27428

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

DenisChenu

2013-11-27 15:16

developer   ~27429

Thanks philg,

I just remove the ltrim. Not needed. Just keep rtrim due to DECIMAL in SQL.

c_schmitz

2013-12-09 15:23

administrator   ~27528

2.05 Build 131209 released.

Related Changesets

LimeSurvey: 2.05 083a1964

2013-11-27 14:14:27

DenisChenu

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