Issue Bug Closed

#19514TCEmain wrongly tests required input-type fields

Francois Suter 10/28/08, 11:34 updated 01/21/09, 10:09

Description

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.

The solution is to introduce a finer testing:

if (!isset($value) || $value === ‘’)

(issue imported from #M9659)

Reviews 0

No change resolves or names this issue in its commit message, and no comment links one.