[TYPO3-core] RFC: is_array check extension manager

Michael Stucki michael at typo3.org
Wed Aug 15 08:51:15 CEST 2007


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.

- michael

Franz Holzinger wrote on Wednesday 15 August 2007:
> Hello Wolfgang,
>
> this is the wrong isset item I think:
>
> if (isset($conf['constraints']['conflicts']) &&
> is_array($conf['constraints']['conflicts'])) {
>
> It should be like this:
>
> if (is_array($conf['constraints']) &&
> is_array($conf['constraints']['conflicts'])) {
>
> >>> as this bugs me every now and then
> >>> here's a patch that adds some is_array checks before
> >>> foreach (should be common practice ;-))
>
>  - Franz
> _______________________________________________
> TYPO3-team-core mailing list
> TYPO3-team-core at lists.netfielders.de
> http://lists.netfielders.de/cgi-bin/mailman/listinfo/typo3-team-core
-------------- 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/4635bb55/attachment-0001.pgp 


More information about the TYPO3-team-core mailing list