Bug #81462 [Opn->Csd]: mime_content_type() indicates wrong arg num on TypeError

From: Date: Mon, 20 Sep 2021 21:49:28 +0000
Subject: Bug #81462 [Opn->Csd]: mime_content_type() indicates wrong arg num on TypeError
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-236721@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=81462&edit=1 ID: 81462 Updated by: git@php.net Reported by: girgias@php.net Summary: mime_content_type() indicates wrong arg num on TypeError -Status: Open +Status: Closed Type: Bug Package: Filesystem function related PHP Version: 8.0.11RC1 Block user comment: N Private report: N New Comment: Automatic comment on behalf of Girgias Revision: https://github.com/php/php-src/commit/0ea38b950939f362898c4114672566ec7c561b2f Log: Fix Bug #81462 mime_content_type() indicates wrong arg num on TypeError Previous Comments: ------------------------------------------------------------------------ [2021-09-20 21:46:42] girgias@php.net 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 this bug report at https://bugs.php.net/bug.php?id=81462&edit=1

« previous php.bugs (#236721) next »