View Issue Details

This bug affects 1 person(s).
 12
IDProjectCategoryView StatusLast Update
18494Bug reportsExpression Managerpublic2023-09-25 10:55
Reportertwilllig Assigned Totibor.pacalat  
PrioritynoneSeveritypartial_block 
Status closedResolutionfixed 
Product Version5.4.x 
Summary18494: TypeError during demo survey "ls205_em_tailoring"
Description

When you particpate in that survey and reach page 3 "Dynamic Math Display" type error happens.

Steps To Reproduce

Steps to reproduce

  • Import docs/demosurveys/ls205_em_tailoring.lss
  • Preview survey
  • fill out survey

Expected result

  • finish the survey

Actual result

at page 3 "Dynamic Math Display" an type error happens
"abs(): Argument #1 ($num) must be of type int|float, string given" in application\helpers\expressions\em_core_helper.php(2188)

See screenshot.

TagsNo tags attached.
Attached Files
type_error.png (42,817 bytes)   
type_error.png (42,817 bytes)   
Bug heat12
Complete LimeSurvey version number (& build)5.4.11
I will donate to the project if issue is resolvedNo
BrowserChrome
Database type & versionmySql
Server OS (if known)
Webserver software & version (if known)
PHP Version8.0.16

Relationships

related to 18401 closedgabrieljenik Unable to use checkdate function if debug set 

Users monitoring this issue

There are no users monitoring this issue.

Activities

DenisChenu

DenisChenu

2022-11-17 14:39

developer   ~72799

Debug set to 2, right ?

DenisChenu

DenisChenu

2022-11-17 14:40

developer   ~72800

If yes : need a wrapper (see related)

twilllig

twilllig

2022-11-18 09:22

developer   ~72806

Last edited: 2022-11-18 09:23

Yes, debug = 2
On debug = 0 it's a 500, of course.

definetely needs a wrapper, and I bet if abs() is solved, the next function will have a type error. This demo survey is full of math functions.

DenisChenu

DenisChenu

2022-11-18 09:32

developer   ~72808

On debug = 0 it's a 500, of course.

Oh ? PHP8 only ?

PHP7 :
With debug = 2 : you can not edit question (same issue)
But no issue with debug=0

List of function is big …

twilllig

twilllig

2022-11-18 09:41

developer   ~72809

Maybe depends on strict_type setting,
or PHP7 is more forgiving with the issue?!

DenisChenu

DenisChenu

2022-11-18 09:43

developer   ~72810

or PHP7 is more forgiving with the issue?!

yes , see changelog : https://www.php.net/manual/en/function.abs.php

DenisChenu

DenisChenu

2022-11-18 09:43

developer   ~72811

partial_block : PHP8 or debug

maybe block ?

twilllig

twilllig

2022-11-23 16:02

developer   ~72865

maybe block, but noone else reported it, yet.

DenisChenu

DenisChenu

2022-11-23 16:29

developer   ~72866

Debian stable are not on PHP8
What for ubuntu LTS ?

twilllig

twilllig

2022-11-23 16:48

developer   ~72867

google says: Ubuntu 20.04 (which is latest LTS) is on 7.4

So relax until April 2025 when 21.10 will be the new LTS with PHP8? :)

gabrieljenik

gabrieljenik

2023-09-13 16:20

manager   ~77000

v5: https://github.com/LimeSurvey/LimeSurvey/pull/3441

guest

guest

2023-09-14 11:11

viewer   ~77019

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

guest

guest

2023-09-14 11:11

viewer   ~77020

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

tibor.pacalat

tibor.pacalat

2023-09-14 11:16

administrator   ~77021

@gabrieljenik I see there is a branch for master, but no PR. Are you still working on it, or?

gabrieljenik

gabrieljenik

2023-09-14 13:52

manager   ~77030

@tibor.pacalat Yes, I was pending to review and do the PR
Master: https://github.com/LimeSurvey/LimeSurvey/pull/3443

tibor.pacalat

tibor.pacalat

2023-09-14 15:51

administrator   ~77043

Tested and merged fix for master as well.

guest

guest

2023-09-14 15:52

viewer   ~77044

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

guest

guest

2023-09-14 15:52

viewer   ~77045

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

LimeBot

LimeBot

2023-09-18 09:10

administrator   ~77105

Fixed in Release 6.2.7+230918

gabrieljenik

gabrieljenik

2023-09-18 13:54

manager   ~77113

Test Case Updated: https://github.com/LimeSurvey/LimeSurvey/pull/3452

guest

guest

2023-09-22 18:17

viewer   ~77288

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

LimeBot

LimeBot

2023-09-25 10:55

administrator   ~77304

Fixed in Release 6.2.9+230925

Related Changesets

LimeSurvey: 5.x 36bcb0a1

2023-09-14 11:11:18

Gabriel Jenik


Committer: GitHub Details Diff
Fixed issue 18494: TypeError during demo survey "ls205_em_tailoring" (#3441)

Co-authored-by: Lapiu Dev <devgit@lapiu.biz>
Affected Issues
18494
mod - application/helpers/expressions/em_core_helper.php Diff File
add - tests/unit/ExpressionManagerTest.php Diff File
mod - tests/unit/LSYiiValidatorsTest.php Diff File

LimeSurvey: 5.x 36bcb0a1

2023-09-14 11:11:18

Gabriel Jenik


Committer: GitHub Details Diff
Fixed issue 18494: TypeError during demo survey "ls205_em_tailoring" (#3441)

Co-authored-by: Lapiu Dev <devgit@lapiu.biz>
Affected Issues
18494
mod - application/helpers/expressions/em_core_helper.php Diff File
add - tests/unit/ExpressionManagerTest.php Diff File
mod - tests/unit/LSYiiValidatorsTest.php Diff File

LimeSurvey: master a640099f

2023-09-14 15:50:12

Gabriel Jenik


Committer: GitHub Details Diff
Fixed issue 18494: TypeError during demo survey "ls205_em_tailoring" (#3443)

Co-authored-by: Lapiu Dev <devgit@lapiu.biz>
Affected Issues
18494
mod - application/helpers/expressions/em_core_helper.php Diff File
add - tests/unit/ExpressionManagerTest.php Diff File

LimeSurvey: master a640099f

2023-09-14 15:50:12

Gabriel Jenik


Committer: GitHub Details Diff
Fixed issue 18494: TypeError during demo survey "ls205_em_tailoring" (#3443)

Co-authored-by: Lapiu Dev <devgit@lapiu.biz>
Affected Issues
18494
mod - application/helpers/expressions/em_core_helper.php Diff File
add - tests/unit/ExpressionManagerTest.php Diff File

LimeSurvey: master 02838acc

2023-09-22 17:58:45

Gabriel Jenik


Committer: GitHub Details Diff
Fixed issue 18494: TypeError during demo survey "ls205_em_tailoring" (03452)

Co-authored-by: Lapiu Dev <devgit@lapiu.biz>
Affected Issues
18494
mod - tests/unit/ExpressionManagerTest.php Diff File

Issue History

Date Modified Username Field Change
2022-11-17 13:42 twilllig New Issue
2022-11-17 13:42 twilllig File Added: type_error.png
2022-11-17 14:39 DenisChenu Note Added: 72799
2022-11-17 14:39 DenisChenu Bug heat 0 => 2
2022-11-17 14:40 DenisChenu Relationship added related to 18401
2022-11-17 14:40 DenisChenu Note Added: 72800
2022-11-18 09:22 twilllig Note Added: 72806
2022-11-18 09:22 twilllig Bug heat 2 => 4
2022-11-18 09:23 twilllig Note Edited: 72806
2022-11-18 09:32 DenisChenu Note Added: 72808
2022-11-18 09:41 twilllig Note Added: 72809
2022-11-18 09:43 DenisChenu Note Added: 72810
2022-11-18 09:43 DenisChenu Severity minor => partial_block
2022-11-18 09:43 DenisChenu Note Added: 72811
2022-11-23 16:02 twilllig Note Added: 72865
2022-11-23 16:29 DenisChenu Note Added: 72866
2022-11-23 16:48 twilllig Note Added: 72867
2023-08-31 18:55 gabrieljenik Assigned To => gabrieljenik
2023-08-31 18:55 gabrieljenik Status new => assigned
2023-09-13 16:20 gabrieljenik Assigned To gabrieljenik => DenisChenu
2023-09-13 16:20 gabrieljenik Status assigned => ready for code review
2023-09-13 16:20 gabrieljenik Note Added: 77000
2023-09-13 16:20 gabrieljenik Bug heat 4 => 6
2023-09-13 17:07 DenisChenu Assigned To DenisChenu => twilllig
2023-09-13 17:07 DenisChenu Status ready for code review => ready for testing
2023-09-14 11:11 Changeset attached => LimeSurvey 5.x 36bcb0a1
2023-09-14 11:11 guest Note Added: 77019
2023-09-14 11:11 Changeset attached => LimeSurvey 5.x 36bcb0a1
2023-09-14 11:11 guest Note Added: 77020
2023-09-14 11:11 guest Bug heat 6 => 8
2023-09-14 11:16 tibor.pacalat Note Added: 77021
2023-09-14 11:16 tibor.pacalat Bug heat 8 => 10
2023-09-14 11:17 tibor.pacalat Assigned To twilllig => tibor.pacalat
2023-09-14 11:17 tibor.pacalat Status ready for testing => in testing
2023-09-14 13:52 gabrieljenik Note Added: 77030
2023-09-14 15:51 tibor.pacalat Status in testing => resolved
2023-09-14 15:51 tibor.pacalat Resolution open => fixed
2023-09-14 15:51 tibor.pacalat Note Added: 77043
2023-09-14 15:52 Changeset attached => LimeSurvey master a640099f
2023-09-14 15:52 guest Note Added: 77044
2023-09-14 15:52 Changeset attached => LimeSurvey master a640099f
2023-09-14 15:52 guest Note Added: 77045
2023-09-18 09:10 LimeBot Note Added: 77105
2023-09-18 09:10 LimeBot Status resolved => closed
2023-09-18 09:10 LimeBot Bug heat 10 => 12
2023-09-18 13:54 gabrieljenik Note Added: 77113
2023-09-18 13:55 gabrieljenik Assigned To tibor.pacalat => DenisChenu
2023-09-18 13:55 gabrieljenik Status closed => ready for code review
2023-09-19 10:19 DenisChenu Assigned To DenisChenu => gabrieljenik
2023-09-19 10:19 DenisChenu Status ready for code review => ready for merge
2023-09-21 23:03 gabrieljenik Assigned To gabrieljenik => tibor.pacalat
2023-09-22 17:59 tibor.pacalat Status ready for merge => resolved
2023-09-22 18:17 Changeset attached => LimeSurvey master 02838acc
2023-09-22 18:17 guest Note Added: 77288
2023-09-25 10:55 LimeBot Note Added: 77304
2023-09-25 10:55 LimeBot Status resolved => closed