php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #52563 error_reporting constant
Submitted: 2010-08-07 19:20 UTC Modified: 2010-12-01 15:31 UTC
Votes:3
Avg. Score:4.7 ± 0.5
Reproduced:3 of 3 (100.0%)
Same Version:3 (100.0%)
Same OS:3 (100.0%)
From: mattgscox at hotmail dot com Assigned:
Status: Wont fix Package: Scripting Engine problem
PHP Version: * OS:
Private report: No CVE-ID: None
Have you experienced this issue?
Rate the importance of this bug to you:

 [2010-08-07 19:20 UTC] mattgscox at hotmail dot com
Description:
------------
Feature request only;

For completeness, and coding clarity, please define constant E_NONE to set error reporting to none rather than relying on the absolute integer value of 0

Test script:
---------------
error_reporting(E_NONE);

Expected result:
----------------
[No error warning]

Actual result:
--------------
PHP Notice:  Use of undefined constant E_NONE - assumed 'E_NONE'  ....

Patches

E_ALL (last revision 2010-08-27 10:52 UTC by aharvey@php.net)
E_NONE (last revision 2010-08-27 10:41 UTC by aharvey@php.net)
E_NONE-and-E_EVERYTHING (last revision 2010-08-10 03:00 UTC by aharvey@php.net)

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2010-08-08 18:14 UTC] felipe@php.net
-Type: Bug +Type: Feature/Change Request
 [2010-08-09 12:39 UTC] aharvey@php.net
-Status: Open +Status: Assigned -Assigned To: +Assigned To: aharvey
 [2010-08-09 12:45 UTC] aharvey@php.net
-Status: Assigned +Status: Open -Assigned To: aharvey +Assigned To:
 [2010-08-09 12:45 UTC] aharvey@php.net
Bah, forgot I don't have karma for Zend. Patch against trunk about to be attached: this seems harmless enough, and a quick Google suggests people do expect this to work.
 [2010-08-09 12:46 UTC] aharvey@php.net
The following patch has been added/updated:

Patch Name: E_NONE
Revision:   1281350770
URL:        http://bugs.php.net/patch-display.php?bug=52563&patch=E_NONE&revision=1281350770
 [2010-08-09 19:31 UTC] kalle@php.net
While we are at it, we should add an E_ALL constant to -1 to display all errors in the bitfield
 [2010-08-10 04:35 UTC] aharvey@php.net
It's a shame that E_ALL was changed to not mean "all errors" in the first place, really.

I'll hack up a revised patch (along with an update to the UPGRADING file, since I forgot that first time around) which defines E_EVERYTHING = -1 -- we can bikeshed the exact name on Internals later, if necessary.
 [2010-08-10 05:00 UTC] aharvey@php.net
The following patch has been added/updated:

Patch Name: E_NONE-and-E_EVERYTHING
Revision:   1281409252
URL:        http://bugs.php.net/patch-display.php?bug=52563&patch=E_NONE-and-E_EVERYTHING&revision=1281409252
 [2010-08-24 18:44 UTC] stas@php.net
Frankly, I don't see why we need a constant meaning 0. What's wrong with, say... 0?
 [2010-08-27 12:41 UTC] aharvey@php.net
The following patch has been added/updated:

Patch Name: E_NONE
Revision:   1282905701
URL:        http://bugs.php.net/patch-display.php?bug=52563&patch=E_NONE&revision=1282905701
 [2010-08-27 12:52 UTC] aharvey@php.net
The following patch has been added/updated:

Patch Name: E_ALL
Revision:   1282906379
URL:        http://bugs.php.net/patch-display.php?bug=52563&patch=E_ALL&revision=1282906379
 [2010-08-27 12:53 UTC] aharvey@php.net
Updated the E_NONE patch to include mentioning the new constant in
UPGRADING.

Also added a requested patch to alter E_ALL to actually include all error
reporting levels again, rather than excluding E_STRICT.
 [2010-12-01 15:30 UTC] jani@php.net
-Summary: [Feature request] error_reporting constant +Summary: error_reporting constant
 [2010-12-01 15:31 UTC] jani@php.net
-Status: Open +Status: Wont fix -Package: PHP options/info functions +Package: Scripting Engine problem -Operating System: Any +Operating System: -PHP Version: Irrelevant +PHP Version: *
 [2010-12-01 15:31 UTC] jani@php.net
Considered -> declined.
 [2012-03-02 15:38 UTC] cyberscribe@php.net
Why was this denied? Reasons given here and at #16330 seem logical and in line with best practice.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Tue Mar 19 02:01:28 2024 UTC