Skip to content

Commit

Permalink
Merge pull request #205 from level-level/fix-non-symlinked-render-call
Browse files Browse the repository at this point in the history
Fixes issue when calling render with a non-absolute path.
  • Loading branch information
NielsdeBlaauw authored Nov 5, 2020
2 parents 8ab3805 + dd37b3e commit d301a43
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/Templates.php
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,10 @@ public function render( $path, $objects, $ignore_warning = false ):void {
* @return string
*/
public function render_twig( $path, $objects, $ignore_warning = false ) {
$path = realpath( $path );
$clean_path = realpath( $path );
if ( $clean_path ) {
$path = $clean_path;
}

// Twig arguments.
if ( ! $ignore_warning && $this->has_been_called ) {
Expand Down

0 comments on commit d301a43

Please sign in to comment.