You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello everyone, I encountered an error when closing the archive. The archive itself opens normally, I work with data from it, but when closing it I get errors:
#0 D:\OSPanel\domains\cct_ref_back\vendor\zanysoft\laravel-zip\src\Zip.php(515): ZipArchive->close() #1 D:\OSPanel\domains\cct_ref_back\app\Services\Import\IspringAdapter.php(445): ZanySoft\Zip\Zip->close() #2 D:\OSPanel\domains\cct_ref_back\app\Services\Import\ImportService.php(54): App\Services\Import\IspringAdapter->close()
Invalid or uninitialized Zip object
code 0
But how can it be uninitialized if I managed to open it and save data inside it?
My open and close methods:
public function open(string $fileName): void
{
$tempDir = FileHelper::createTempDir();
if (!Zip::check($fileName)) {
throw new \Exception("check err");
}
$zipArchive = Zip::open($fileName);
if (!$zipArchive->extract($tempDir)) {
throw new \Exception("open err");
}
$this->_archiveInstance = $zipArchive;
$this->_archive = $tempDir;
}
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hello everyone, I encountered an error when closing the archive. The archive itself opens normally, I work with data from it, but when closing it I get errors:
#0 D:\OSPanel\domains\cct_ref_back\vendor\zanysoft\laravel-zip\src\Zip.php(515): ZipArchive->close() #1 D:\OSPanel\domains\cct_ref_back\app\Services\Import\IspringAdapter.php(445): ZanySoft\Zip\Zip->close() #2 D:\OSPanel\domains\cct_ref_back\app\Services\Import\ImportService.php(54): App\Services\Import\IspringAdapter->close()
Invalid or uninitialized Zip object
code 0
But how can it be uninitialized if I managed to open it and save data inside it?
My open and close methods:
Beta Was this translation helpful? Give feedback.
All reactions