Bug #80229 [NEW]: assert_options should have "int" and "bool" for $value parameter PHPDoc

From: Date: Tue, 13 Oct 2020 14:54:19 +0000
Subject: Bug #80229 [NEW]: assert_options should have "int" and "bool" for $value parameter PHPDoc
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-229598@lists.php.net to get a copy of this message
From: ondrej at mirtes dot cz Operating system: PHP version: 8.0.0rc1 Package: Reflection related Bug Type: Bug Bug description:assert_options should have "int" and "bool" for $value parameter PHPDoc Description: ------------ The function assert_options accepts integers and booleans as the second argument. Currently according to the stub's PHPDoc, it only accepts strings, callables and null. The PHPDoc should be corrected. I guess the assert_options function can be called with either "1" or "true" for the same result... Expected result: ---------------- /** @param string|callable|int|bool|null $value */ function assert_options(int $option, $value = UNKNOWN) : array|object|int|string|null { } Actual result: -------------- /** @param string|callable|null $value */ function assert_options(int $option, $value = UNKNOWN) : array|object|int|string|null { } -- Edit bug report at https://bugs.php.net/bug.php?id=80229&edit=1 -- Fix committed: https://bugs.php.net/fix.php?id=80229&r=fixed Fixed in release: https://bugs.php.net/fix.php?id=80229&r=alreadyfixed Need backtrace: https://bugs.php.net/fix.php?id=80229&r=needtrace Need Reproduce Script: https://bugs.php.net/fix.php?id=80229&r=needscript Try newer version: https://bugs.php.net/fix.php?id=80229&r=oldversion Not developer issue: https://bugs.php.net/fix.php?id=80229&r=support Expected behavior: https://bugs.php.net/fix.php?id=80229&r=notwrong Not enough info: https://bugs.php.net/fix.php?id=80229&r=notenoughinfo Submitted twice: https://bugs.php.net/fix.php?id=80229&r=submittedtwice register_globals: https://bugs.php.net/fix.php?id=80229&r=globals PHP version support discontinued: https://bugs.php.net/fix.php?id=80229&r=phptooold Daylight Savings: https://bugs.php.net/fix.php?id=80229&r=dst IIS Stability: https://bugs.php.net/fix.php?id=80229&r=isapi Install GNU Sed: https://bugs.php.net/fix.php?id=80229&r=gnused Floating point limitations: https://bugs.php.net/fix.php?id=80229&r=float No Zend Extensions: https://bugs.php.net/fix.php?id=80229&r=nozend MySQL Configuration Error: https://bugs.php.net/fix.php?id=80229&r=mysqlcfg

« previous php.bugs (#229598) next »