mirror of
https://github.com/Mibew/handlebars.php.git
synced 2025-05-02 18:26:40 +03:00
Create cache dir if it does not exist.
This commit is contained in:
parent
72d4a9cd3e
commit
1b65a63b0c
@ -45,6 +45,13 @@ class Handlebars_Cache_Disk implements Handlebars_Cache
|
|||||||
if (empty($path)) {
|
if (empty($path)) {
|
||||||
throw new InvalidArgumentException('Must specify disk cache path');
|
throw new InvalidArgumentException('Must specify disk cache path');
|
||||||
}
|
}
|
||||||
|
else if (!is_dir($path)) {
|
||||||
|
@mkdir($path, 0777, true);
|
||||||
|
|
||||||
|
if (!is_dir($path)) {
|
||||||
|
throw new RuntimeException('Could not create cache file path');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
$this->_path = $path;
|
$this->_path = $path;
|
||||||
$this->_prefix = $prefix;
|
$this->_prefix = $prefix;
|
||||||
|
Loading…
Reference in New Issue
Block a user