Skip to content

Commit 1e62d20

Browse files
committed
Merge branch 'PHP-8.3'
2 parents 9b7dac4 + ea83eba commit 1e62d20

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

ext/fileinfo/fileinfo.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -373,12 +373,14 @@ static void _php_finfo_get_type(INTERNAL_FUNCTION_PARAMETERS, int mode, int mime
373373
php_stream_wrapper *wrap;
374374
php_stream_statbuf ssb;
375375

376+
// Implementation is used for both finfo_file() and mimetype_emu()
377+
int buffer_param_num = (mimetype_emu ? 1 : 2);
376378
if (buffer == NULL || buffer_len == 0) {
377379
zend_argument_must_not_be_empty_error(1);
378380
goto clean;
379381
}
380382
if (CHECK_NULL_PATH(buffer, buffer_len)) {
381-
zend_argument_type_error(1, "must not contain any null bytes");
383+
zend_argument_type_error(buffer_param_num, "must not contain any null bytes");
382384
goto clean;
383385
}
384386

0 commit comments

Comments
 (0)