Skip to content

Commit cf4d519

Browse files
committed
Исправил ошибку с некорректным обновлением кеша
1 parent 63c5027 commit cf4d519

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

src/Maximaster/Tools/Twig/BitrixLoader.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ class BitrixLoader extends \Twig_Loader_Filesystem implements \Twig_LoaderInterf
2424
*/
2525
public function getSource($name)
2626
{
27-
return file_get_contents($this->getSourcePath($this->normalizeName($name)));
27+
return file_get_contents($this->getSourcePath($name));
2828
}
2929

3030
/** {@inheritdoc} */
@@ -43,7 +43,7 @@ public function getCacheKey($name)
4343
*/
4444
public function isFresh($name, $time)
4545
{
46-
return filemtime($this->getSource($name)) <= $time;
46+
return filemtime($this->getSourcePath($name)) <= $time;
4747
}
4848

4949
/**
@@ -55,6 +55,8 @@ public function isFresh($name, $time)
5555
*/
5656
public function getSourcePath($name)
5757
{
58+
$name = $this->normalizeName($name);
59+
5860
if (isset(static::$resolved[ $name ])) {
5961
return static::$resolved[ $name ];
6062
}

0 commit comments

Comments
 (0)