1
0
mirror of https://github.com/php/php-src.git synced 2026-03-24 00:02:20 +01:00

fileinfo: Change return type of finfo_close() to true (#18395)

This function is a noop and always returns `true`.
This commit is contained in:
Tim Düsterhus
2025-04-22 20:18:08 +02:00
committed by GitHub
parent 68794e074b
commit 54a0a7924a
4 changed files with 7 additions and 3 deletions

1
NEWS
View File

@@ -69,6 +69,7 @@ PHP NEWS
- Fileinfo:
. Upgrade to file 5.46. (nielsdos)
. Change return type of finfo_close() to true. (timwolla)
- FPM:
. Fixed GH-17645 (FPM with httpd ProxyPass does not decode script path).

View File

@@ -348,6 +348,9 @@ PHP 8.5 UPGRADE NOTES
- Fileinfo:
. Upgraded to file 5.46.
. The return type of finfo_close() has been changed to true, rather
than bool.
- PCRE:
. Upgraded to pcre2lib from 10.44 to 10.45.

View File

@@ -92,7 +92,7 @@ class finfo
/** @refcount 1 */
function finfo_open(int $flags = FILEINFO_NONE, ?string $magic_database = null): finfo|false {}
function finfo_close(finfo $finfo): bool {}
function finfo_close(finfo $finfo): true {}
function finfo_set_flags(finfo $finfo, int $flags): true {}

View File

@@ -1,12 +1,12 @@
/* This is a generated file, edit the .stub.php file instead.
* Stub hash: 96d78126bc5af37c5d94fa160e509623e947de48 */
* Stub hash: d5bc322159e4af87077c07ddaca0a77803b4743a */
ZEND_BEGIN_ARG_WITH_RETURN_OBJ_TYPE_MASK_EX(arginfo_finfo_open, 0, 0, finfo, MAY_BE_FALSE)
ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, flags, IS_LONG, 0, "FILEINFO_NONE")
ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, magic_database, IS_STRING, 1, "null")
ZEND_END_ARG_INFO()
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_finfo_close, 0, 1, _IS_BOOL, 0)
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_finfo_close, 0, 1, IS_TRUE, 0)
ZEND_ARG_OBJ_INFO(0, finfo, finfo, 0)
ZEND_END_ARG_INFO()