Project

General

Profile

Actions

Bug #71562

closed

be.infobox viewHelper can't render success messages because of usage of MathUtility::forceIntegerInRange()

Added by Georg Tiefenbrunn about 9 years ago. Updated about 6 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
-
Target version:
-
Start date:
2015-11-13
Due date:
% Done:

100%

Estimated time:
TYPO3 Version:
7
PHP Version:
Tags:
Complexity:
Is Regression:
No
Sprint Focus:

Description

<f:be.infobox message="..." state="0" /> should output a success message (STATE_OK), but STATE_NOTICE (-2) is rendered.

The param state ic checked using $state = MathUtility::forceIntegerInRange($arguments['state'], -2, 2, -2); which always returns the default value (-2) if state is 0 (zero).

Imho it's a bug in MathUtility::forceIntegerInRange(). At the moment the given value in always replaced by the default value if it's zero and thus it's impossible to test zero values.

Actions

Also available in: Atom PDF