Issue Bug Closed

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

Georg Tiefenbrunn 11/13/15, 15:04 updated 10/02/18, 11:29

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.

Reviews 2