ext/standard/head.c: Change return type of php_header() to bool

This commit is contained in:
Gina Peter Bnayard 2024-08-12 18:20:20 +02:00
parent 2297e50772
commit 67a15cf457
2 changed files with 4 additions and 4 deletions

View file

@ -67,12 +67,12 @@ PHP_FUNCTION(header_remove)
}
/* }}} */
PHPAPI int php_header(void)
PHPAPI bool php_header(void)
{
if (sapi_send_headers()==FAILURE || SG(request_info).headers_only) {
return 0; /* don't allow output */
return false; /* don't allow output */
} else {
return 1; /* allow output */
return true; /* allow output */
}
}

View file

@ -27,7 +27,7 @@
extern PHP_RINIT_FUNCTION(head);
PHPAPI int php_header(void);
PHPAPI bool php_header(void);
PHPAPI zend_result php_setcookie(zend_string *name, zend_string *value, time_t expires,
zend_string *path, zend_string *domain, bool secure, bool httponly,
zend_string *samesite, bool url_encode);