mirror of
https://github.com/fenom-template/fenom.git
synced 2023-08-10 21:13:07 +03:00
Fix bug: invalid cache name then templates extends via array
This commit is contained in:
@@ -938,7 +938,6 @@ class Fenom
|
||||
return $tpl;
|
||||
}
|
||||
} elseif ($this->_options & self::FORCE_COMPILE) {
|
||||
|
||||
return $this->compile($template, $this->_options & self::DISABLE_CACHE & ~self::FORCE_COMPILE, $options);
|
||||
} else {
|
||||
return $this->_storage[$key] = $this->_load($template, $options);
|
||||
@@ -1020,13 +1019,13 @@ class Fenom
|
||||
$template = $this->getRawTemplate()->load($tpl);
|
||||
} else {
|
||||
$template = $this->getRawTemplate()->load($tpl[0], false);
|
||||
unset($tpl[0]);
|
||||
foreach ($tpl as $t) {
|
||||
$template->extend($t);
|
||||
for($i = 1; $i < count($tpl); $i++) {
|
||||
$template->extend($tpl[ $i ]);
|
||||
}
|
||||
}
|
||||
if ($store) {
|
||||
$cache = $this->_getCacheName($tpl, $options);
|
||||
dumpt($cache, $tpl);
|
||||
$tpl_tmp = tempnam($this->_compile_dir, $cache);
|
||||
$tpl_fp = fopen($tpl_tmp, "w");
|
||||
if (!$tpl_fp) {
|
||||
|
||||
Reference in New Issue
Block a user