Browse Source

docx encoder: fix temp file deletion

Olivier Massot 1 năm trước cách đây
mục cha
commit
4bcb85ffd5
1 tập tin đã thay đổi với 1 bổ sung2 xóa
  1. 1 2
      src/Service/Export/Encoder/DocXEncoder.php

+ 1 - 2
src/Service/Export/Encoder/DocXEncoder.php

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