Bug #79969 [PATCH]: Wrong error message in strict mode

From: Date: Sun, 16 Aug 2020 05:41:47 +0000
Subject: Bug #79969 [PATCH]: Wrong error message in strict mode
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-228608@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 Patch added by: jdomenechbborges@gmail.com Reported by: david at grudl dot com Summary: Wrong error message in strict mode Status: Verified Type: Bug Package: Reflection related PHP Version: 7.3 Block user comment: N Private report: N New Comment: The following pull request has been associated: Patch Name: Fix #79969: Wrong error message in strict mode in ReflectionMethod::_construct On GitHub: https://github.com/php/php-src/pull/5995 Patch: https://github.com/php/php-src/pull/5995.patch 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 (#228608) next »