Bug #77287 [Asn]: Fatal error: Uncaught TypeError
| From: | nikic@php.net | Date: | Thu, 03 Jan 2019 08:29:41 +0000 |
| Subject: | Bug #77287 [Asn]: Fatal error: Uncaught TypeError | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-218768@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=77287&edit=1
ID: 77287
Updated by: nikic@php.net
Reported by: someone dot is dot alive at gmail dot com
Summary: Fatal error: Uncaught TypeError
Status: Assigned
Type: Bug
Package: opcache
Operating System: Windows
PHP Version: 7.3.0
Assigned To: nikic
Block user comment: N
Private report: N
New Comment:
Thanks. So no 32-bit, but also using the combination of opcache and xdebug.
Previous Comments:
------------------------------------------------------------------------
[2019-01-03 07:14:00] someone dot is dot alive at gmail dot com
My setup:
Windows 10, build 17763, x64
Apache 2.4.34, x64
PHP x64 TS
Xdebug v2.7.0beta1
------------------------------------------------------------------------
[2019-01-02 13:15:48] nikic@php.net
If you are using a 32-bit build, then I've committed a possible fix in https://github.com/php/php-src/commit/325a1139744413420a62d3006c04914587628810.
If not, then the issue must be somewhere else...
------------------------------------------------------------------------
[2019-01-02 12:20:20] nikic@php.net
Could it be that you're on a 32-bit system (or use a 32-bit PHP build)?
------------------------------------------------------------------------
[2018-12-28 11:35:55] pirogen at protonmail dot com
It looks like the bug only occurs with *both* opcache and xdebug enabled. Disabling *either* makes
the issue go away.
------------------------------------------------------------------------
[2018-12-26 00:49:14] pirogen at protonmail dot com
I've encountered this as well after upgrading from 7.2 to 7.3 on Debian Testing. Unfortunately,
I can't seem to reproduce it in a minimal fashion; it only occurs in a project with rather
large graph of inter-dependent objects.
The bug manifests itself with class methods that use constants (can be a class constant, built-in
constant or user-defined global constant) as default parameter values, i.e.:
public function someMethod($some_param=SOME_CONSTANT) {}
When someMethod is called with no arguments, $some_param *sometimes* (more often than not, but not
always) receives a value that var_dump() identifies as NFC. Which, if passed down to a function or
method that expects a specific type, throws a "[function] expects parameter [num] to be [type],
unknown given" error OP mentions.
------------------------------------------------------------------------
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=77287
--
Edit this bug report at https://bugs.php.net/bug.php?id=77287&edit=1