View Issue Details

IDProjectCategoryView StatusLast Update
15803Bug reportsExpression Managerpublic2020-01-31 14:13
ReporterDenisChenu Assigned Toollehar  
PrioritynormalSeverityminor 
Status acknowledgedResolutionopen 
Product Version3.22.1 
Summary15803: No warning shown when compare numeric with string function
Description

When comparing a number with a string function : there are no warning

Steps To Reproduce

Import included lss : check logic

But clearly {3 lt str_pad("A", 3)} must be set as warning

Additional Information

Function return always NUMBER type
Must return STRING or NUMBER (and maybe BOOLEAN ?)

TagsNo tags attached.
Complete LimeSurvey version number (& build)3.22 and 4.10
I will donate to the project if issue is resolvedNo
Browsernot relevant
Database & DB-Versionnot relevant
Server OS (if known)not relevant
Webserver software & version (if known)not relevant
PHP Versionphp7.3

Relationships

related to 15802 acknowledgedollehar Invalid warning string about numeric value 

Activities

DenisChenu

DenisChenu

2020-01-31 08:46

developer  

ollehar

ollehar

2020-01-31 12:55

administrator   ~55582

lt? Same as '<'?

DenisChenu

DenisChenu

2020-01-31 14:12

developer   ~55586

https://manual.limesurvey.org/Expression_Manager#Operators

&lt; &lt;= > >= lt le gt ge

DenisChenu

DenisChenu

2020-01-31 14:13

developer   ~55587

Oups : link where return a number : https://github.com/LimeSurvey/LimeSurvey/blob/eba81f2ab24d2b2484d7b2b1d730df191b573aed/application/helpers/expressions/em_core_helper.php#L2182

Issue History

Date Modified Username Field Change
2020-01-31 08:46 DenisChenu New Issue
2020-01-31 08:46 DenisChenu File Added: Capture d’écran du 2020-01-31 08-46-33.png
2020-01-31 08:46 DenisChenu File Added: limesurvey_survey_BadWarning.lss
2020-01-31 08:47 DenisChenu Relationship added related to 15802
2020-01-31 12:55 ollehar Note Added: 55582
2020-01-31 12:55 ollehar Priority none => normal
2020-01-31 13:45 ollehar Status new => acknowledged
2020-01-31 13:45 ollehar Assigned To => ollehar
2020-01-31 13:45 ollehar Status acknowledged => assigned
2020-01-31 13:45 ollehar Status assigned => acknowledged
2020-01-31 14:12 DenisChenu Note Added: 55586
2020-01-31 14:13 DenisChenu Note Added: 55587