getgrav/grav · error · RuntimeException
ZipArchiver: failed to write "{target}".
Error message
ZipArchiver: failed to write "{target}". What it means
Error "ZipArchiver: failed to write "{target}"." thrown in getgrav/grav.
Source
Thrown at system/src/Grav/Common/Filesystem/ZipArchiver.php:261
fclose($stream);
}
}
/**
* Close the archive, remove everything extracted so far, and throw. Keeps a
* rejected archive from leaving partial output on disk.
*
* @param ZipArchive $zip
* @param string $destination
* @param string $message
* @return never
*/
protected function abortExtraction(ZipArchive $zip, string $destination, string $message): void
{
$zip->close();
Folder::delete($destination);
throw new RuntimeException($message);
}
/**
* @param string $source
* @param callable|null $status
* @return $this
*/
public function compress($source, ?callable $status = null)
{
if (!extension_loaded('zip')) {
throw new InvalidArgumentException('ZipArchiver: Zip PHP module not installed...');
}
// Get real path for our folder
$rootPath = realpath($source);
if (!$rootPath) {
throw new InvalidArgumentException('ZipArchiver: ' . $source . ' cannot be found...');
}View on GitHub (pinned to 6040efed04)
When it happens
Trigger: Thrown at system/src/Grav/Common/Filesystem/ZipArchiver.php:261 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of getgrav/grav@6040efed04 (2026-08-17).
Data as JSON: /api/errors/341ad06472d5fc20.
Report an issue: GitHub.