mirror of
https://github.com/php/php-src.git
synced 2025-08-16 05:58:45 +02:00
Merge branch 'PHP-8.0' into PHP-8.1
* PHP-8.0: Fix Bug #81462 mime_content_type() indicates wrong arg num on TypeError
This commit is contained in:
commit
16c98d481f
2 changed files with 5 additions and 5 deletions
|
@ -335,7 +335,7 @@ static void _php_finfo_get_type(INTERNAL_FUNCTION_PARAMETERS, int mode, int mime
|
|||
break;
|
||||
|
||||
default:
|
||||
zend_argument_type_error(2, "must be of type resource|string, %s given", zend_zval_type_name(what));
|
||||
zend_argument_type_error(1, "must be of type resource|string, %s given", zend_zval_type_name(what));
|
||||
RETURN_THROWS();
|
||||
}
|
||||
|
||||
|
|
|
@ -41,10 +41,10 @@ try {
|
|||
|
||||
?>
|
||||
--EXPECTF--
|
||||
mime_content_type(): Argument #2 must be of type resource|string, int given
|
||||
mime_content_type(): Argument #2 must be of type resource|string, null given
|
||||
mime_content_type(): Argument #2 must be of type resource|string, stdClass given
|
||||
mime_content_type(): Argument #2 must be of type resource|string, array given
|
||||
mime_content_type(): Argument #1 ($filename) must be of type resource|string, int given
|
||||
mime_content_type(): Argument #1 ($filename) must be of type resource|string, null given
|
||||
mime_content_type(): Argument #1 ($filename) must be of type resource|string, stdClass given
|
||||
mime_content_type(): Argument #1 ($filename) must be of type resource|string, array given
|
||||
|
||||
Warning: mime_content_type(foo/inexistent): Failed to open stream: No such file or directory in %s on line %d
|
||||
mime_content_type(): Argument #1 ($filename) cannot be empty
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue