Re: PHP 4.0 Bug #6118 Updated: Can not supress runtime warnings on foreach

From: Date: Fri, 11 Aug 2000 18:52:14 +0000
Subject: Re: PHP 4.0 Bug #6118 Updated: Can not supress runtime warnings on foreach
Groups: php.dev 
Request: Send a blank email to php-dev+get-28641@lists.php.net to get a copy of this message
Excuse me, but what you are saying makes absolutely no sense. In case you haven't looked at my sample code, the parse error is generated by the @ (or 'supress warnings') symbol, not by any of the code itself. Remove the @ and see that there are no parse errors. The manual CLEARLY states that errors can be supressed, but obviouly foreach is an exception to this rule. THIS IS THE BUG - the fact that we have a function behaving in a unique, contrary fashion to the others. Therefore, this IS a valid bug. Ronen. PS: Thanks for the condescending attitude. I am already using a is_array wrap around my foreach's , to substitute for @. However, this is a bug, and should be noted as such until it is fixed, rather than automatically closing the incident. On 12 Aug 2000, Bug Database wrote: > Date: 12 Aug 2000 06:40:05 -0000 > To: ronen@greyzone.com > From: Bug Database <php-dev@lists.php.net> > Subject: PHP 4.0 Bug #6118 Updated: Can not supress runtime warnings on > foreach > > ID: 6118 > Updated by: derick > Reported By: ronen@greyzone.com > Status: Closed > Bug Type: Feature/Change Request > Assigned To: > Comments: > > At the moment it seems that parse errors can not be suppressed, but I > think it is not possible to do it, and it is absolutely not useful. > > >From the manual: > "All PHP expressions can also be called with the "@" prefix, which turns > off error reporting for that particular expression" > > But if PHP can see there is an expression (because of an parse error), > there is no way to disable warnings from that statement. > > Full Bug description available at: http://bugs.php.net/?id=6118 > >

« previous php.dev (#28641) next »