Skip to content

Commit 54a0a79

Browse files
authored
fileinfo: Change return type of finfo_close() to true (#18395)
This function is a noop and always returns `true`.
1 parent 68794e0 commit 54a0a79

File tree

4 files changed

+7
-3
lines changed

4 files changed

+7
-3
lines changed

NEWS

+1
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,7 @@ PHP NEWS
6969

7070
- Fileinfo:
7171
. Upgrade to file 5.46. (nielsdos)
72+
. Change return type of finfo_close() to true. (timwolla)
7273

7374
- FPM:
7475
. Fixed GH-17645 (FPM with httpd ProxyPass does not decode script path).

UPGRADING

+3
Original file line numberDiff line numberDiff line change
@@ -348,6 +348,9 @@ PHP 8.5 UPGRADE NOTES
348348

349349
- Fileinfo:
350350
. Upgraded to file 5.46.
351+
. The return type of finfo_close() has been changed to true, rather
352+
than bool.
353+
351354

352355
- PCRE:
353356
. Upgraded to pcre2lib from 10.44 to 10.45.

ext/fileinfo/fileinfo.stub.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ public function set_flags(int $flags): true {}
9292
/** @refcount 1 */
9393
function finfo_open(int $flags = FILEINFO_NONE, ?string $magic_database = null): finfo|false {}
9494

95-
function finfo_close(finfo $finfo): bool {}
95+
function finfo_close(finfo $finfo): true {}
9696

9797
function finfo_set_flags(finfo $finfo, int $flags): true {}
9898

ext/fileinfo/fileinfo_arginfo.h

+2-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)