[TYPO3-core] RFC: is_array check extension manager

Michael Stucki michael at typo3.org
Wed Aug 15 12:04:15 CEST 2007

Hi Ernesto,

> I must agree with Franz here. is_array already does an implicit "isset",
> so it is redundant to check for both. This is not documented anywhere
> explicitly, but can be extracted from the is_array documentation fragment:
> 	"Returns TRUE if var is an array, FALSE otherwise."
> If "var" is not even defined, it will also return FALSE (and NO warning,
> as Franz already demonstrated).

There's just no warning because error_reporting excludes warnings:

error_reporting = E_ALL ^ E_WARN

This is hardcoded somewhere in the TYPO3 code, but try it out without hiding 
the warnings:

=== cut ===

$aa = array();
if (is_array($aa['aaa'])) {
        echo 'a';
=== cut ===

- michael
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://lists.netfielders.de/pipermail/typo3-team-core/attachments/20070815/0c1fe533/attachment.pgp 

More information about the TYPO3-team-core mailing list