[TYPO3-core] RFC: is_array check extension manager

Franz Holzinger franz at fholzinger.com
Wed Aug 15 10:02:54 CEST 2007


Michael Stucki writes: 

> No because he loops over $conf['constraints']['conflicts']. 
> 
> $conf['constrains'] can be an array while still there might be no 
> $conf['constraints']['conflicts']! So checking this first using isset is the 
> only right thing to do. 
> 
> Please double-check such tiny issues before writing to this list.

I see no sense in this to check isset anded with is_array. If it is an array 
it must be also be set. So the first parameter is redundant. 

See php.net 

bool is_array ( mixed $var ) 

Finds whether the given variable is an array. 

>> if (isset($conf['constraints']['conflicts']) &&
>> is_array($conf['constraints']['conflicts'])) {

 - Franz


More information about the TYPO3-team-core mailing list