View Issue Details

This bug affects 1 person(s).
 4
IDProjectCategoryView StatusLast Update
18494Bug reportsExpression Managerpublic2022-11-23 16:48
Reportertwilllig Assigned To 
PrioritynoneSeveritypartial_block 
Status newResolutionopen 
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.
Bug heat4
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 ready for testing Unable to use checkdate function if debug set 

Users monitoring this issue

User List There are no users monitoring this issue.

Activities

twilllig

twilllig

2022-11-17 13:42

developer  

type_error.png (42,817 bytes)   
type_error.png (42,817 bytes)   
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? :)

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