[php-src] PR #24290: Fix GH-24289: finfo::file() reports the wrong argument number
| From: | lazerg | Date: | Tue, 13 Oct 2026 09:47:36 +0000 |
| Subject: | [php-src] PR #24290: Fix GH-24289: finfo::file() reports the wrong argument number | ||
| Groups: | php.git-pulls | ||
| Request: | Send a blank email to git-pulls+get-39374@lists.php.net to get a copy of this message | ||
Pull Request: https://github.com/php/php-src/pull/24290
Author: lazerg
finfo_file() and finfo::file() share one implementation, and on PHP-8.4
the argument number for the empty and null byte checks is only switched for
mime_content_type(). So the method reports Argument #2 ($flags) while
$filename is argument 1 there. This uses 1 when called as a method too.
PHP-8.5 and master hardcode 2 for the empty check in finfo_file() instead,
so that part will need adjusting on merge up.
Fixes GH-24289