PHP error

ZipArchive::open(): Passing null to parameter #2 ($flags) of type int is deprecated

/media/shnoulle/data/webdev/noplugin/application/libraries/Zip.php(19)

07  */
08 class Zip extends \ZipArchive
09 {
10     protected $opened = false;
11 
12     /**
13      * @inheritdoc
14      * @param bool $checkZipBomb If true, check for Zip Bombing
15      */
16     #[\ReturnTypeWillChange]
17     public function open($filename, $flags = 0, $checkZipBomb = true)
18     {
19         $result = parent::open($filename, $flags);
20         $this->opened = ($result === true);
21         if ($result === true && $checkZipBomb && $this->isZipBomb()) {
22             throw new \Exception("Unzipped file is bigger than upload_max_filesize or post_max_size");
23         }
24         return $result;
25     }
26 
27     /**
28      * @inheritdoc
29      */
30     public function close() : bool
31     {

Stack Trace

#0
+
 /media/shnoulle/data/webdev/noplugin/application/libraries/Zip.php(19): ZipArchive->open("toolsDomDocument.zip", null)
14      * @param bool $checkZipBomb If true, check for Zip Bombing
15      */
16     #[\ReturnTypeWillChange]
17     public function open($filename, $flags = 0, $checkZipBomb = true)
18     {
19         $result = parent::open($filename, $flags);
20         $this->opened = ($result === true);
21         if ($result === true && $checkZipBomb && $this->isZipBomb()) {
22             throw new \Exception("Unzipped file is bigger than upload_max_filesize or post_max_size");
23         }
24         return $result;
#1
+
 /media/shnoulle/data/webdev/noplugin/application/helpers/common_helper.php(4999): LimeSurvey\Zip->open("toolsDomDocument.zip", null, false)
4994  */
4995 function isZipBomb($zip_filename)
4996 {
4997     $isZipBomb = false;
4998     $zip = new LimeSurvey\Zip();
4999     if ($zip->open($zip_filename, null, false) === true) {
5000         $isZipBomb = $zip->isZipBomb();
5001         $zip->close();
5002     }
5003     return $isZipBomb;
5004 }
#2
+
 /media/shnoulle/data/webdev/noplugin/application/libraries/ExtensionInstaller/FileFetcherUploadZip.php(213): isZipBomb("toolsDomDocument.zip")
208      */
209     protected function checkZipBomb()
210     {
211         // Check zip bomb.
212         \Yii::import('application.helpers.common_helper', true);
213         if (isZipBomb($_FILES['the_file']['name'])) {
214             throw new Exception(gT('Unzipped file is too big.'));
215         }
216     }
217 
218     /**
2025-05-05 07:05:26 nginx/1.22.1 Yii Framework/1.1.30