Explorar o código

docx encoder: fix temp file deletion

Olivier Massot hai 1 ano
pai
achega
4bcb85ffd5
Modificáronse 1 ficheiros con 1 adicións e 2 borrados
  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;
         }
     }
 }