Selaa lähdekoodia

docx encoder: fix temp file deletion

Olivier Massot 1 vuosi sitten
vanhempi
commit
4bcb85ffd5
1 muutettua tiedostoa jossa 1 lisäystä ja 2 poistoa
  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;
         }
     }
 }