From 10280cf3062a0886151e6537b184a98b2f8df758 Mon Sep 17 00:00:00 2001 From: Seamus Lee Date: Mon, 1 Jun 2026 04:42:41 +1000 Subject: [PATCH] Apply patch to fix warning notice on PHP8.5 and add php8.5 to ci.yml file --- .github/workflows/ci.yml | 2 ++ src/parts/fileparts/disk_file.php | 5 ++++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 576d5895..ef872991 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -22,6 +22,8 @@ jobs: include: - php: '8.4' experimental: true + - php: '8.5' + experimental: true name: "PHP: ${{ matrix.php }}" diff --git a/src/parts/fileparts/disk_file.php b/src/parts/fileparts/disk_file.php index 70525923..8adb4fe7 100644 --- a/src/parts/fileparts/disk_file.php +++ b/src/parts/fileparts/disk_file.php @@ -67,7 +67,10 @@ public function __construct( $fileName, $contentType = null, $mimeType = null ) $this->contentType = self::CONTENT_TYPE_APPLICATION; $this->mimeType = "octet-stream"; } - finfo_close( $fileInfo ); + if ( version_compare(PHP_VERSION, '8.5.0', '<') ) + { + finfo_close( $fileInfo ); + } } else {