Unsupported operand types: float + string

Created on 12 January 2025, 3 months ago

?>

Problem/Motivation

I have been successfully using the following twig to calculate totals on a Webform. {{(+data.2501231530 +data.2501240900 +data.5012410001 +data.5112410002 +data.5012411151 +data.5012411152 +data.5012314451 +data.5012410002 +data.5012411153)|number_format(2,'.',',')}} hr(s). Unfortunately, I am now getting "An exception has been thrown during the rendering of a template ("Unsupported operand types: float + string") in "_string_template_926c51c68ffeb4e7506fcba55c66eadb" at line 1. The issue began after updating to Drupal 10.4.0, PHP 8.3.15 DB 10.11.6-MariaDB

Steps to reproduce

Since I am not a programmer and, in an effort, to try to resolve the issue, I begin removing elements to try to determine the problem. What I have found is that adding conditions to some elements (not all) seems to cause the problem. When I remove the conditions to certain elements the issue goes away.

Proposed resolution

If I have posted this in the wrong location, I sincerely apologize and would appreciate any assistance ensuring it is moved or updated as necessary. Any assistance would be GREATLY APPRECIATED

Remaining tasks

User interface changes

API changes

Data model changes

πŸ’¬ Support request
Status

Active

Version

6.3

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States BLB76

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024