Skip to content

Commit 8ee73ae

Browse files
authored
Twig parser - fix typo in views_paths variable assignment
also fixes CLI rendering paths where output buffering may be disabled
1 parent 697291d commit 8ee73ae

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

classes/view/twig.php

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ protected function process_file($file_override = false)
6161
$views_paths[] = $path . 'views';
6262
}
6363
}
64-
$views_pathsp[] = APPPATH . 'views';
64+
$views_paths[] = APPPATH . 'views';
6565
}
6666
array_unshift($views_paths, pathinfo($file, PATHINFO_DIRNAME));
6767

@@ -115,7 +115,10 @@ protected function process_file($file_override = false)
115115
catch (\Exception $e)
116116
{
117117
// Delete the output buffer & re-throw the exception
118-
ob_end_clean();
118+
if (ob_get_level() > 0)
119+
{
120+
ob_end_clean();
121+
}
119122
throw $e;
120123
}
121124

0 commit comments

Comments
 (0)