Skip to content

Commit

Permalink
[BUGFIX] fix temporary directory for platform.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
kaystrobach committed May 16, 2019
1 parent 54122ac commit c433889
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions Classes/Renderer/MPdfRenderer.php
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,16 @@ protected function convert($html = '') {
}

try {
$tempDir = FLOW_PATH_TEMPORARY . '/KayStrobach.Pdf';
if (!@mkdir($tempDir, 0777, true) && !is_dir($tempDir)) {
throw new \InvalidArgumentException('Could not create TempDir ' . $tempDir);
}

$mpdf = new Mpdf(
[
'',
$this->getOption('papersize') . $orientation
'mode' => '',
'format' => $this->getOption('papersize') . $orientation,
'tempDir' => $tempDir
]
);

Expand Down

0 comments on commit c433889

Please sign in to comment.