[Typo3-dev] PHP5

Robert Lemke rl at robertlemke.de
Tue Apr 20 19:15:31 CEST 2004


Hi Christian,

On Tue, 2004-04-20 at 18:43, Christian Jul Jensen wrote:

> This behavior is actually used some places in the TYPO3 core. I
> managed to fix the ones I've found (with some supervising from
> Kasper). I will check up on those and commit them to cvs one of the
> days.

Thanks for that!

> in PHP5, in order not to risk a fatal error, this would have to be:
> $my_array = $some_weird_function_that_returns_a_multidim_array();
> if(     is_array($my_array['some']) && 
>         is_array($my_array['some']['special']) && 
>         is_array($my_array['some']['special']['value']) &&
>         is_array($my_array['some']['special']['value']['that']) &&
>         is_array($my_array['some']['special']['value']['that']['i']) &&
>         is_array($my_array['some']['special']['value']['that']['i']['need'])
> ) {
>         apply_logic();
> }

That would be really cruel. I hope there is simple solution for that because I also 
relied on the old syntax at many places ...

But if there is no easy, at least we have something to complain about on the PHPconference ;-)

-- 
robert

"They placed me on this earth without a manual. 
 And I dare to say, I’m doing just fine without ;)"






More information about the TYPO3-dev mailing list