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 #1

Updated by Felix Kopp almost 9 years ago

can be seen in EXT: styleguide also. positive infobox with state=0 not possible

Actions #2

Updated by Gerrit Code Review almost 9 years ago

  • Status changed from New to Under Review

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

Actions #3

Updated by Gerrit Code Review almost 9 years ago

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

Actions #4

Updated by Gerrit Code Review almost 9 years ago

Patch set 1 for branch TYPO3_7-6 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/45683

Actions #5

Updated by Wouter Wolters almost 9 years ago

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

Updated by Benni Mack about 6 years ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF