[TYPO3-core] RFC: #10954: Validation issue: Images with empty attributes in Module menu in BE
Patrick Broens
patrick at netcreators.com
Wed Apr 22 13:54:50 CEST 2009
Hi Oliver
Oliver Klee wrote:
> Hi,
>
> +1 by reading if you change the !empty to != '' (to make your intent
> clearer, because the variable is a string, not an array).
empty() is not only for arrays.
"" (an empty string)
0 (0 as an integer)
"0" (0 as a string)
NULL
FALSE
array() (an empty array)
var $var; (a variable declared, but without a value in a class)
IMHO using empty() is better practice than using != ''
Patrick
>
>
> Oliver
More information about the TYPO3-team-core
mailing list