Skip to content
This repository was archived by the owner on Oct 22, 2021. It is now read-only.

Commit 8fea23e

Browse files
committed
Fix absolute cache path #5
1 parent c84e5a0 commit 8fea23e

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

src/TwigCompiler.php

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,15 +46,13 @@ public function __construct(Environment $twig, string $cachePath, bool $verbose
4646
}
4747

4848
$this->twig = $twig;
49-
$this->cachePath = str_replace('\\', '/', trim($cachePath, '\/'));
49+
$this->cachePath = pathinfo(str_replace('\\', '/', $cachePath), PATHINFO_DIRNAME);
5050
$this->verbose = $verbose;
5151
}
5252

5353
/**
5454
* Compile all twig templates.
5555
*
56-
* @throws Exception Exception
57-
*
5856
* @return bool Success
5957
*/
6058
public function compile(): bool

0 commit comments

Comments
 (0)