diff --git a/ext/fileinfo/fileinfo.c b/ext/fileinfo/fileinfo.c index f7868514531..90919e706e8 100644 --- a/ext/fileinfo/fileinfo.c +++ b/ext/fileinfo/fileinfo.c @@ -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(); } diff --git a/ext/fileinfo/tests/mime_content_type_001.phpt b/ext/fileinfo/tests/mime_content_type_001.phpt index df7d3e4c5e9..38c136f3844 100644 --- a/ext/fileinfo/tests/mime_content_type_001.phpt +++ b/ext/fileinfo/tests/mime_content_type_001.phpt @@ -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