[Typo3-dev] PHP problem revived
Johannes Reichardt
mailbox at gramba.net
Mon Apr 26 14:34:47 CEST 2004
hi there,
did you try the latest RC2 as well? ;)
http://www.heise.de/newsticker/meldung/46851
- Johannes
> Hi,
>
> Martin-no$pam-Kutschker wrote:
>
>>> Tobias Weidelt wrote:
>>>
>>>> //@ to suppress the error message:
>>>>
>>>> if (is_array(@$a['a']['b']['c'])) {
>>>
>>
>> The @ in front of the $ ... I don't know, just doesn't look right.
>>
>> What about this:
>>
>> if (@is_array($a['a']['b']['c'])) { ... }
>
>
> I didn't try it, but I think that will not work, because it's not the
> is_array-function giving an error, but the usage of an uninitialized
> array. Therefore the @ in front of the array.
> Hm -- I'm too curious, I will try it, one moment...
>
> Ok, you are right, it works with the @ in front of is_array! :-)
> BTW I don't get an error but only a notice when I use an uninitialised
> array...
>
> [...]
>
> Sorry, I re-read Kaspers message: error only occours if $a['a'] in the
> example above is a variable i.e.
> $a['a'] = 'hello'
> but not an array. This happens here, too. :-(
> You CAN suppress the error in this case, but then PHP "dies" silently
> instead; in my example it wouldn't show anything.
> It's also not possible to use the new exception handling. Perhaps it
> would be possible to convince the PHP coders to convert the error to a
> non "fatal" one, so error handling/suppression would be possible.
>
> Sorry that I couldn't help further,
> Tobias Weidelt
> _______________________________________________
> Typo3-dev mailing list
> Typo3-dev at lists.netfielders.de
> http://lists.netfielders.de/cgi-bin/mailman/listinfo/typo3-dev
>
More information about the TYPO3-dev
mailing list