diff --git a/CHANGELOG.md b/CHANGELOG.md index 6771b30..f18aa0c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,10 @@ Changelog ========= +### 1.4.2 (2013-09-06) + +- Added check the cache directory to record + ### 1.4.1 (2013-09-05) - Fix equating for {case} in {switch} diff --git a/src/Fenom.php b/src/Fenom.php index 12c5063..3354428 100644 --- a/src/Fenom.php +++ b/src/Fenom.php @@ -292,10 +292,14 @@ class Fenom * Set compile directory * * @param string $dir directory to store compiled templates in + * @throws LogicException * @return Fenom */ public function setCompileDir($dir) { + if(!is_writable($dir)) { + throw new LogicException("Cache directory $dir is not writable"); + } $this->_compile_dir = $dir; return $this; }