[TYPO3-core] RFC: Bugfix #9659: TCEmain wrongly tests required input-type fields
Francois Suter
fsuter at cobweb.ch
Tue Oct 28 11:39:00 CET 2008
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
--
Francois Suter
Cobweb Development Sarl - http://www.cobweb.ch
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: bug9659.patch
Url: http://lists.netfielders.de/pipermail/typo3-team-core/attachments/20081028/920a4748/attachment.txt
More information about the TYPO3-team-core
mailing list