View Issue Details
| ID | Project | Category | View Status | Date Submitted | Last Update |
|---|---|---|---|---|---|
| 15802 | Bug reports | Expression Manager | public | 2020-01-31 08:43 | 2026-10-31 19:46 |
| Reporter | DenisChenu | Assigned To | c_schmitz | ||
| Priority | normal | Severity | minor | ||
| Status | resolved | Resolution | fixed | ||
| Product Version | 3.22.1 | ||||
| Summary | 15802: Invalid warning string about numeric value | ||||
| Description | The warning show with function and + operator are always «Usage of + with numeric value, see manual about usage of sum.» and never «Usage of + with string value» | ||||
| Steps To Reproduce | Import included survey, check logic file | ||||
| Additional Information | 2 issues here :
| ||||
| Tags | No tags attached. | ||||
| Attached Files | |||||
| Bug heat | 8 | ||||
| Complete LimeSurvey version number (& build) | 3.22 and 4.10 | ||||
| I will donate to the project if issue is resolved | No | ||||
| Browser | not relevant | ||||
| Database type & version | not relevant | ||||
| Server OS (if known) | not relevant | ||||
| Webserver software & version (if known) | not relevant | ||||
| PHP Version | php7.3 | ||||
| Git branch / Pull Request URL | |||||
|
Str concat instead of + ? |
|
|
Maybe : bothnumeric : I view this yesterday on a training instance about date. It's clearly string concat needed, but still talk to sum … |
|
|
Warning text: "Please use concat() instead of '+' when concatenating two strings." ? |
|
|
Remind : when checking in logic file, you don't have real value … Then for example : single choice Q1.NAOK return "" even if all choice are number :) Then bothNumeric : yes sure at 100%, not bothnumeric … : maybe both numeric. |
|
|
User should type-cast NAOK to int with parseInt(). |
|
|
See the lss : even with I know user must use sum or join (no need intval …) , and we give him the advice … but seems strabnge to see use sum with Then : i think |
|
|
Fix committed to master branch: http://bugs.limesurvey.org/plugin.php?page=Source/view&id=41198 |
|
|
LimeSurvey: master e61c7fd1 2026-10-31 19:46 Details Diff |
Fixed issue 15802: The survey logic check always told to use sum() for the + operator, even when it joins texts Dev EMWarningPlusOperator gets an operand type; string operands suggest join(), operands with unknown values suggest sum() or join() |
Affected Issues 15802 |
|
| mod - application/helpers/expressions/em_core_helper.php | Diff File | ||
| mod - application/helpers/expressions/warnings/EMWarningPlusOperator.php | Diff File | ||
| mod - tests/unit/helpers/ExpressionWarningTest.php | Diff File | ||
| Date Modified | Username | Field | Change |
|---|---|---|---|
| 2020-01-31 08:43 | DenisChenu | New Issue | |
| 2020-01-31 08:43 | DenisChenu | File Added: limesurvey_survey_BadWarning.lss | |
| 2020-01-31 08:43 | DenisChenu | File Added: Capture d’écran du 2020-01-31 08-36-10.png | |
| 2020-01-31 08:47 | DenisChenu | Summary | INvalid warning string about numeric value => Invalid warning string about numeric value |
| 2020-01-31 08:47 | DenisChenu | Relationship added | related to 15803 |
| 2020-01-31 11:33 | ollehar | Note Added: 55577 | |
| 2020-01-31 12:02 | DenisChenu | Note Added: 55578 | |
| 2020-01-31 12:51 | ollehar | Note Added: 55580 | |
| 2020-01-31 12:52 | ollehar | Priority | none => normal |
| 2020-01-31 13:45 | ollehar | Assigned To | => ollehar |
| 2020-01-31 13:45 | ollehar | Status | new => acknowledged |
| 2020-01-31 14:15 | DenisChenu | Note Added: 55589 | |
| 2020-01-31 15:13 | ollehar | Note Added: 55591 | |
| 2020-01-31 16:32 | DenisChenu | Note Added: 55598 | |
| 2024-12-19 16:34 | duvemyster | Issue Monitored: duvemyster | |
| 2024-12-19 16:34 | duvemyster | Bug heat | 4 => 6 |
| 2026-10-31 19:46 | c_schmitz | Changeset attached | => LimeSurvey master e61c7fd1 |
| 2026-10-31 19:46 | c_schmitz | Note Added: 87052 | |
| 2026-10-31 19:46 | c_schmitz | Assigned To | ollehar => c_schmitz |
| 2026-10-31 19:46 | c_schmitz | Status | acknowledged => resolved |
| 2026-10-31 19:46 | c_schmitz | Resolution | open => fixed |
| 2026-10-31 19:46 | c_schmitz | Bug heat | 6 => 8 |