Doc #76318 [Ver->Csd]: Unclear statement in set_error_handler docs
Edit report at https://bugs.php.net/bug.php?id=76318&edit=1
ID: 76318
Updated by: salathe@php.net
Reported by: teo8976 at gmail dot com
Summary: Unclear statement in set_error_handler docs
-Status: Verified
+Status: Closed
Type: Documentation Problem
Package: Documentation problem
PHP Version: Irrelevant
-Assigned To:
+Assigned To: salathe
Block user comment: N
Private report: N
New Comment:
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.
Previous Comments:
------------------------------------------------------------------------
[2020-02-05 20:04:01] 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
------------------------------------------------------------------------
[2018-05-09 18:12:07] 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.
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=76318&edit=1
Thread (3 messages)