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
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
MUST BE VALID
Solve the problem:
36 - 28 = ?
Subscribe to this entry?

 
 [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: Tue Apr 23 07:01:29 2024 UTC