[TYPO3-core] RFC: Bugfix #9659: TCEmain wrongly tests required input-type fields
Francois Suter
fsuter at cobweb.ch
Fri Oct 31 08:56:18 CET 2008
Hi,
This one requires a core +1. It's quite an easy one ;-)
Cheers
François
> This is an SVN patch request.
>
> Type: Bugfix
>
> Bugtracker references:
> http://bugs.typo3.org/view.php?id=9659
>
> Branches:
> TYPO3_4-1, TYPO3_4-2 and trunk
>
> Problem:
> When an input-type field is marked as "required" in the TCA, TCEmain
> tests it simply with
>
> if (!$value)
>
> This is insufficient, since in the case of an "int" field, for example,
> 0 is a perfectly valid value, but it will fail the "required" test.
>
>
> Solution:
> Introduce a finer testing:
>
> if (!isset($value) || $value === '')
>
> Cheers
>
More information about the TYPO3-team-core
mailing list