|
@@ -44,11 +44,10 @@ class DocXEncoder implements EncoderInterface
|
|
|
$this->phpDocx->createDocx($tempFilename);
|
|
$this->phpDocx->createDocx($tempFilename);
|
|
|
|
|
|
|
|
return file_get_contents($tempFilename);
|
|
return file_get_contents($tempFilename);
|
|
|
- } catch (\Throwable $e) {
|
|
|
|
|
|
|
+ } finally {
|
|
|
if (is_file($tempFilename)) {
|
|
if (is_file($tempFilename)) {
|
|
|
unlink($tempFilename);
|
|
unlink($tempFilename);
|
|
|
}
|
|
}
|
|
|
- throw $e;
|
|
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|