Project

General

Profile

Actions

Bug #100281

closed

Passing number-only properties to form field ViewHelpers causes exception

Added by Andreas Nedbal over 1 year ago. Updated 5 months ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
Fluid
Target version:
-
Start date:
2023-03-24
Due date:
% Done:

100%

Estimated time:
TYPO3 Version:
12
PHP Version:
8.1
Tags:
Complexity:
Is Regression:
Sprint Focus:

Description

We're currently upgrading Powermail to version 12 and encountered an issue with form fields if the property passed to it is a int instead of (expectedly) a string. This worked in versions before 12.

Here's the template causing the issue (this repository is not the v12 version yet, but the template is identical)
https://github.com/einpraegsam/powermail/blob/develop/Resources/Private/Partials/Output/Search.html#L33

This triggers following exception in AbstractFormFieldViewHelper

explode(): Argument #2 ($string) must be of type string, int given

In regards of typing, this behaviour makes sense and I'd personally even say that number-only form properties are an edge case, but it still massively breaks this part of the extension.

Explicitly typecasting the usages of the property argument in AbstractFormFieldViewHelper solves this.

Actions #1

Updated by Gerrit Code Review over 1 year ago

  • Status changed from New to Under Review

Patch set 1 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/78294

Actions #2

Updated by Gerrit Code Review over 1 year ago

Patch set 2 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/78294

Actions #3

Updated by Gerrit Code Review over 1 year ago

Patch set 3 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/78294

Actions #4

Updated by Gerrit Code Review over 1 year ago

Patch set 1 for branch 11.5 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/78573

Actions #5

Updated by Benni Mack over 1 year ago

  • Status changed from Under Review to Resolved
  • % Done changed from 0 to 100
Actions #6

Updated by Benni Mack 5 months ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF