Bug #81462 [NEW]: mime_content_type() indicates wrong arg num on TypeError
| From: | girgias@php.net | Date: | Mon, 20 Sep 2021 21:46:42 +0000 |
| Subject: | Bug #81462 [NEW]: mime_content_type() indicates wrong arg num on TypeError | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-236720@lists.php.net to get a copy of this message | ||
From: girgias
Operating system:
PHP version: 8.0.11RC1
Package: Filesystem function related
Bug Type: Bug
Bug description:mime_content_type() indicates wrong arg num on TypeError
Description:
------------
mime_content_type() indicates the wrong argument number when a TypeError
is emitted.
Test script:
---------------
try {
mime_content_type(1);
} catch (\TypeError $e) {
echo $e->getMessage() . \PHP_EOL;
}
Expected result:
----------------
mime_content_type(): Argument #1 ($filename) must be of type
resource|string, int given
Actual result:
--------------
mime_content_type(): Argument #2 must be of type resource|string, int
given
--
Edit bug report at https://bugs.php.net/bug.php?id=81462&edit=1
--
Fix committed: https://bugs.php.net/fix.php?id=81462&r=fixed
Fixed in release: https://bugs.php.net/fix.php?id=81462&r=alreadyfixed
Need backtrace: https://bugs.php.net/fix.php?id=81462&r=needtrace
Need Reproduce Script: https://bugs.php.net/fix.php?id=81462&r=needscript
Try newer version: https://bugs.php.net/fix.php?id=81462&r=oldversion
Not developer issue: https://bugs.php.net/fix.php?id=81462&r=support
Expected behavior: https://bugs.php.net/fix.php?id=81462&r=notwrong
Not enough info: https://bugs.php.net/fix.php?id=81462&r=notenoughinfo
Submitted twice: https://bugs.php.net/fix.php?id=81462&r=submittedtwice
register_globals: https://bugs.php.net/fix.php?id=81462&r=globals
PHP version support discontinued: https://bugs.php.net/fix.php?id=81462&r=phptooold
Daylight Savings: https://bugs.php.net/fix.php?id=81462&r=dst
IIS Stability: https://bugs.php.net/fix.php?id=81462&r=isapi
Install GNU Sed: https://bugs.php.net/fix.php?id=81462&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=81462&r=float
No Zend Extensions: https://bugs.php.net/fix.php?id=81462&r=nozend
MySQL Configuration Error: https://bugs.php.net/fix.php?id=81462&r=mysqlcfg