php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #76318 Unclear statement in set_error_handler docs
Submitted: 2018-05-09 18:12 UTC Modified: 2020-02-05 20:11 UTC
Votes:1
Avg. Score:3.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:1 (100.0%)
Same OS:1 (100.0%)
From: teo8976 at gmail dot com Assigned: salathe (profile)
Status: Closed Package: Documentation problem
PHP Version: Irrelevant OS:
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: teo8976 at gmail dot com
New email:
PHP Version: OS:

 

 [2018-05-09 18:12 UTC] teo8976 at gmail dot com
Description:
------------
---
From manual page: http://www.php.net/function.set-error-handler
---

This sentence:
"""
The following error types cannot be handled with a user defined function: E_ERROR, E_PARSE, E_CORE_ERROR, E_CORE_WARNING, E_COMPILE_ERROR, E_COMPILE_WARNING, and most of E_STRICT raised in the file where set_error_handler() is called
"""

is ambiguous. It  is unclear whether the part that says "raised in the file where set_error_handler() is called" applies only to E_STRICT, or to all the mentioned error levels.

That is, one could interpret:

A)
""
The following error types cannot be handled with a user defined function: 
- E_ERROR, E_PARSE, E_CORE_ERROR, E_CORE_WARNING, E_COMPILE_ERROR, E_COMPILE_WARNING (wherever they are raised) 
- most of E_STRICT raised in the file where set_error_handler() is called
""

or

B)
""
The following error types cannot be handled with a user defined function: 
{E_ERROR, E_PARSE, E_CORE_ERROR, E_CORE_WARNING, E_COMPILE_ERROR, E_COMPILE_WARNING  and most of E_STRICT}
raised in the file where set_error_handler() is called
""

From what I've been able to test, it seems that the truth is (A)

This must be made clearer.


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2019-01-01 22:09 UTC] girgias@php.net
-Status: Open +Status: Verified
 [2020-02-05 20:04 UTC] salathe@php.net
Automatic comment from SVN on behalf of salathe
Revision: http://svn.php.net/viewvc/?view=revision&revision=349133
Log: Clarify set_error_handler types that cannot be handled (doc bug #76318)

Patch by Sorin Nunca
 [2020-02-05 20:11 UTC] salathe@php.net
-Status: Verified +Status: Closed -Assigned To: +Assigned To: salathe
 [2020-02-05 20:11 UTC] salathe@php.net
This bug has been fixed in the documentation's XML sources. Since the
online and downloadable versions of the documentation need some time
to get updated, we would like to ask you to be a bit patient.

Thank you for the report, and for helping us make our documentation better.


 [2020-02-05 21:23 UTC] mumumu@php.net
Automatic comment from SVN on behalf of mumumu
Revision: http://svn.php.net/viewvc/?view=revision&revision=349137
Log: Clarify set_error_handler types that cannot be handled (doc bug #76318)

Patch by Sorin Nunca
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Wed Apr 24 05:01:30 2024 UTC