Bug #78239 [Nab]: set_error_handler() blocked
Edit report at https://bugs.php.net/bug.php?id=78239&edit=1
ID: 78239
User updated by: cxlblm at gmail dot com
Reported by: cxlblm at gmail dot com
Summary: set_error_handler() blocked
Status: Not a bug
Type: Bug
Package: Reflection related
Operating System: Linux 788f0b0a7ad1 4.9.125-linux
PHP Version: 7.4.0alpha2
Assigned To: cmb
Block user comment: N
Private report: N
New Comment:
Please see this url: https://3v4l.org/7UK9C
error: Process exited with code 137.
Previous Comments:
------------------------------------------------------------------------
[2019-07-03 07:54:15] cmb@php.net
As of PHP 7.4.0, ReflectionType::__toString() generates a
deprecation notice[1], which is caught by your error handler.
This is expected behavior.
If you do not get a similar output as posted by nikic@php.net,
please re-open this ticket, and post the output you have got.
Thanks.
[1] <https://github.com/php/php-src/blob/6ab04a6eef0750ea2d4365be7f9bcfd9caa33449/UPGRADING#L345-L349>
------------------------------------------------------------------------
[2019-07-02 13:17:02] cxlblm at gmail dot com
Sorry, My english is terrible. Above code will worked with Exception, but now blocked!
------------------------------------------------------------------------
[2019-07-02 10:26:12] cmb@php.net
Last line should be
$r->getReturnType()->getName();
------------------------------------------------------------------------
[2019-07-02 10:21:44] cxlblm at gmail dot com
I'm sorry! I lost some code
(string)$r->getReturnType() ?: "";
------------------------------------------------------------------------
[2019-07-02 10:14:01] nikic@php.net
What is the bug? I get:
Fatal error: Uncaught ErrorException: Function ReflectionType::__toString() is deprecated in
/home/nikic/php-7.4/t077.php:20
Stack trace:
#0 /home/nikic/php-7.4/t077.php(20): handleError(8192, 'Function Reflec...',
'/home/nikic/php...', 20, Array)
#1 {main}
thrown in /home/nikic/php-7.4/t077.php on line 20
Which looks correct to me.
------------------------------------------------------------------------
The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
https://bugs.php.net/bug.php?id=78239
--
Edit this bug report at https://bugs.php.net/bug.php?id=78239&edit=1
Thread (10 messages)