mirror of
https://github.com/php/php-src.git
synced 2024-09-21 01:47:25 +00:00
backporting GH-15755 fix.
This commit is contained in:
parent
1e62d203a6
commit
29f9f903b1
@ -376,7 +376,7 @@ static void _php_finfo_get_type(INTERNAL_FUNCTION_PARAMETERS, int mode, int mime
|
||||
// Implementation is used for both finfo_file() and mimetype_emu()
|
||||
int buffer_param_num = (mimetype_emu ? 1 : 2);
|
||||
if (buffer == NULL || buffer_len == 0) {
|
||||
zend_argument_must_not_be_empty_error(1);
|
||||
zend_argument_must_not_be_empty_error(buffer_param_num);
|
||||
goto clean;
|
||||
}
|
||||
if (CHECK_NULL_PATH(buffer, buffer_len)) {
|
||||
|
@ -21,8 +21,8 @@ var_dump(finfo_file($fp, '&'));
|
||||
|
||||
?>
|
||||
--EXPECTF--
|
||||
finfo_file(): Argument #1 ($finfo) must not contain any null bytes
|
||||
finfo_file(): Argument #1 ($finfo) must not be empty
|
||||
finfo_file(): Argument #2 ($filename) must not contain any null bytes
|
||||
finfo_file(): Argument #2 ($filename) must not be empty
|
||||
string(9) "directory"
|
||||
|
||||
Warning: finfo_file(&): Failed to open stream: No such file or directory in %s on line %d
|
||||
|
@ -25,4 +25,4 @@ try {
|
||||
string(28) "text/x-php; charset=us-ascii"
|
||||
string(22) "PHP script, ASCII text"
|
||||
string(29) "text/x-file; charset=us-ascii"
|
||||
finfo_file(): Argument #1 ($finfo) must not contain any null bytes
|
||||
finfo_file(): Argument #2 ($filename) must not contain any null bytes
|
||||
|
Loading…
Reference in New Issue
Block a user