[TYPO3-mvc] checkbox problem

Christian Kartnig office at hahnepeter.de
Wed Aug 17 12:17:03 CEST 2011


Am 17.08.2011 12:03, schrieb Valentin Zickner:
> Hi Christian,
>
>> Do you know why this prevents the type error?
> In the ViewHelper
> (fluid/Classes/ViewHelpers/Form/CheckboxViewHelper.php, Line ~90) they
> prove if checked is NULL (not set in the template). When checked is
> NULL, they call a method called getPropertyValue() and prove the type
> (boolean or array, but you have an integer 0 or 1). If the value is not
> NULL (set in the template), they skip this part and directly prove "if
> ($checked) ...".
>
> regards,
>
> Valentin

Yes, you are right. The type comparison is never executed, when the 
checked attribute exists. I assume, the solution with the checked 
attribute is a workaround and not intended behaviour?

Because actually I thought it should be possible to set a boolean value 
without it. In my model the field is declared boolean.

br,
Christian


More information about the TYPO3-project-typo3v4mvc mailing list