php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #12587 strange error_reporting(0)-behaviour
Submitted: 2001-08-06 06:35 UTC Modified: 2001-08-06 17:50 UTC
From: quappe at erster dot de Assigned:
Status: Closed Package: Documentation problem
PHP Version: 4.0.6 OS: Linux (S.u.S.E 6.1)
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: quappe at erster dot de
New email:
PHP Version: OS:

 

 [2001-08-06 06:35 UTC] quappe at erster dot 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

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2001-08-06 15:01 UTC] 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 15:04 UTC] jeroen@php.net
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...
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat May 04 05:01:30 2024 UTC