Browse files

Fix Compiler::template() not checking the configured cache path.

The method ignored the configured cache path when checking if the directory is writable.
  • Loading branch information...
1 parent 393714b commit 4d2bf79127297411e2acb638368cbd60312ae97f @michaelhue michaelhue committed Nov 28, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 template/view/Compiler.php
View
2 template/view/Compiler.php
@@ -67,7 +67,7 @@ public static function template($file, array $options = array()) {
}
$compiled = static::compile(file_get_contents($file));
- if (is_writable($cachePath) && file_put_contents($template, $compiled) !== false) {
+ if (is_writable($options['path']) && file_put_contents($template, $compiled) !== false) {
foreach (glob("{$options['path']}/template_{$oname}_*.php") as $expired) {
if ($expired !== $template) {
unlink($expired);

0 comments on commit 4d2bf79

Please sign in to comment.