Skip to content

Commit

Permalink
Avoid Deprecation warning from Zip tests on PHP 8.1
Browse files Browse the repository at this point in the history
It is not allowed anymore to open an empty file as a new zip archive.

Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
  • Loading branch information
come-nc committed Dec 16, 2021
1 parent e053feb commit ec4fff2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tests/lib/Archive/ZIPTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,6 @@ protected function getExisting() {
}

protected function getNew() {
return new ZIP(\OC::$server->getTempManager()->getTemporaryFile('.zip'));
return new ZIP(\OC::$server->getTempManager()->getTempBaseDir().'/newArchive.zip');
}
}

0 comments on commit ec4fff2

Please sign in to comment.