Skip to content

Commit 2f4aca7

Browse files
committed
posix: fix misuse of bool (invalid code in c23)
a bool pointer argument cannot take true or false but either &boolval or NULL
1 parent 7bcde7e commit 2f4aca7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

ext/posix/posix.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -508,7 +508,7 @@ PHP_FUNCTION(posix_isatty)
508508
RETURN_FALSE;
509509
}
510510
} else {
511-
if (!zend_parse_arg_long(z_fd, &fd, /* is_null */ false, /* check_null */ false, /* arg_num */ 1)) {
511+
if (!zend_parse_arg_long(z_fd, &fd, /* is_null */ false, /* check_null */ NULL, /* arg_num */ 1)) {
512512
php_error_docref(NULL, E_WARNING, "Argument #1 ($file_descriptor) must be of type int|resource, %s given",
513513
zend_zval_value_name(z_fd));
514514
fd = zval_get_long(z_fd);

0 commit comments

Comments
 (0)