Bug #12587 Updated: strange error_reporting(0)-behaviour

From: Date: Mon, 06 Aug 2001 19:04:08 +0000
Subject: Bug #12587 Updated: strange error_reporting(0)-behaviour
References: 1  Groups: php.dev php.doc 
Request: Send a blank email to php-dev+get-62337@lists.php.net to get a copy of this message
ID: 12587 Updated by: jeroen Reported By: quappe@erster.de Status: Open Bug Type: Documentation problem Operating System: Linux (S.u.S.E 6.1) PHP Version: 4.0.6 New Comment: And, if you once have checked all your .php files for parse errors, you're sure they'll never come unexpectingly. I personally see no use to surpress them... Previous Comments: ------------------------------------------------------------------------ [2001-08-06 15:01:58] jeroen@php.net This is not possible in the script itself, since it is FIRST parsed, and only later executed (since PHP4). So error_reporting is set to 0 only _after_ it has been parsed. Set error_reporing in .htaccess / your .conf file for this kind of stuff. By the way, parse_errors are caused by the script itself, no single external factor changes that. So, a parse error means that the script will never ever execute. This should be more clear in the docs (error_reporting function), so changing to docbug. ------------------------------------------------------------------------ [2001-08-06 06:35:26] quappe@erster.de hey buglist, no script necessary...;-) last friday i installed php4.0.6 (coming from php3.0.17) and found out that it isn't possible any longer to suppress a "forgotten ';' parse error" by setting up error_reporting(0) in my scripts...*sigh* but if i code a "error_reporting = 0" into the php.ini, those error (forgotten ';') is suppressed and cannot be shown again by setting "error_reporting(E_ALL)" in my script...;-( is that the intented aim?! i known about the many, many error-levels and there possibilities, but it would be nice to have the chance to suppress or not those trivial errors in my scripts as well, if desired. bye, daniel ------------------------------------------------------------------------ Edit this bug report at http://bugs.php.net/?id=12587&edit=1

« previous php.dev (#62337) next »