From 468abbb4f0e20136896d9a466d0c324c6cd319d0 Mon Sep 17 00:00:00 2001 From: Dennis Eichhorn Date: Tue, 22 Mar 2022 18:14:00 +0100 Subject: [PATCH] fix php 8.1 type bug --- PhpOffice/PhpWord/Shared/ZipArchive.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/PhpOffice/PhpWord/Shared/ZipArchive.php b/PhpOffice/PhpWord/Shared/ZipArchive.php index bc71e74..a5ed939 100644 --- a/PhpOffice/PhpWord/Shared/ZipArchive.php +++ b/PhpOffice/PhpWord/Shared/ZipArchive.php @@ -133,7 +133,7 @@ class ZipArchive if (!$this->usePclzip) { $zip = new \ZipArchive(); - $result = $zip->open($this->filename, $flags); + $result = $zip->open($this->filename, $flags ?? 0); // Scrutizer will report the property numFiles does not exist // See https://github.com/scrutinizer-ci/php-analyzer/issues/190