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

From: Date: Thu, 13 Aug 2020 12:35:37 +0000
Subject: Bug #79969 [NEW]: Wrong error message in strict mode
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-228567@lists.php.net to get a copy of this message
From: david at grudl dot com Operating system: PHP version: 7.4.9 Package: Reflection related Bug Type: Bug Bug description:Wrong error message in strict mode 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 bug report at https://bugs.php.net/bug.php?id=79969&edit=1 -- Fix committed: https://bugs.php.net/fix.php?id=79969&r=fixed Fixed in release: https://bugs.php.net/fix.php?id=79969&r=alreadyfixed Need backtrace: https://bugs.php.net/fix.php?id=79969&r=needtrace Need Reproduce Script: https://bugs.php.net/fix.php?id=79969&r=needscript Try newer version: https://bugs.php.net/fix.php?id=79969&r=oldversion Not developer issue: https://bugs.php.net/fix.php?id=79969&r=support Expected behavior: https://bugs.php.net/fix.php?id=79969&r=notwrong Not enough info: https://bugs.php.net/fix.php?id=79969&r=notenoughinfo Submitted twice: https://bugs.php.net/fix.php?id=79969&r=submittedtwice register_globals: https://bugs.php.net/fix.php?id=79969&r=globals PHP version support discontinued: https://bugs.php.net/fix.php?id=79969&r=phptooold Daylight Savings: https://bugs.php.net/fix.php?id=79969&r=dst IIS Stability: https://bugs.php.net/fix.php?id=79969&r=isapi Install GNU Sed: https://bugs.php.net/fix.php?id=79969&r=gnused Floating point limitations: https://bugs.php.net/fix.php?id=79969&r=float No Zend Extensions: https://bugs.php.net/fix.php?id=79969&r=nozend MySQL Configuration Error: https://bugs.php.net/fix.php?id=79969&r=mysqlcfg

« previous php.bugs (#228567) next »