Bug #79969 [Opn->Ver]: Wrong error message in strict mode

From: Date: Thu, 13 Aug 2020 12:49:37 +0000
Subject: Bug #79969 [Opn->Ver]: Wrong error message in strict mode
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-228573@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=79969&edit=1 ID: 79969 Updated by: cmb@php.net Reported by: david at grudl dot com Summary: Wrong error message in strict mode -Status: Open +Status: Verified Type: Bug Package: Reflection related -PHP Version: 7.4.9 +PHP Version: 7.3 Block user comment: N Private report: N Previous Comments: ------------------------------------------------------------------------ [2020-08-13 12:35:37] david at grudl dot com Description: ------------ This code new ReflectionMethod('xxx', 1) throws ArgumentCountError: "ReflectionMethod::__construct() expects exactly 1 parameter, 2 given", which is wrong. Test script: --------------- https://3v4l.org/Yvsgk Expected result: ---------------- It should throw TypeError: ReflectionMethod::__construct(): Argument #2 ($method) must be of type string, int given ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=79969&edit=1

« previous php.bugs (#228573) next »