Re: PHP 4.0 Bug #5601 Updated: @function() should not turn of error reporting for critical errors
| From: | Hartmut Holzgraefe | Date: | Mon, 17 Jul 2000 08:25:26 +0000 |
| Subject: | Re: PHP 4.0 Bug #5601 Updated: @function() should not turn of error reporting for critical errors | ||
| References: | 1 | Groups: | php.dev |
| Request: | Send a blank email to php-dev+get-24696@lists.php.net to get a copy of this message | ||
Bug Database wrote:
> Well, why won't you use error_reporting setting then?
> Also, you might use report_error and log_errors (not sure those are exact names)
> to log errors only to logfilke and not to screen.
thats the way i do it in my code, but in this special case i had
problems with code from someone else
> @ is means to make it "real silent" not just "don't report unnecessary
> errors".
thats ok as long as execution continues after the statement 'protected'
by the @, but not on errors that just silently bail out of script
execution as it happens right now
so either critical errors on calling a @'ed funcion should switch
error reporting back on again or as an alternative they should
not terminate execution in this case
the only case i know of where the current behavior leads into
trouble is if the function called is undefined due to a missing
php extension or some other reason, so maybe it would be an option
to make calling an undefined function in the @-form would just
return false without terminating execution
but the 'undefined function' problem is probably something nobody
thinks of when using @, so IMHO it should be handled in some way
to follow the good old 'no supprises' rule ...
--
Hartmut Holzgraefe
hartmut@six.de http://www.six.de +49-711-99091-62 fax:-99