Home » HTML » HTML_Template_Sigma » Bug #6902
Problem w/ cache filename on Windows
Details
| Submitted | 2006-02-23 10:40 UTC |
|---|---|
| From | slaurencot at sqli dot com |
| Assigned | avb |
| Status | Closed |
| Package | HTML_Template_Sigma |
| PHP Version | 4.3.11 |
| OS | WinXP |
| Roadmaps | (Not assigned) |
Comments
[2006-02-23 10:40 UTC] slaurencot at sqli dot com
Description:
------------
The cache filename returned by _cachedName() isn't correct on Windows if using absolute path.
Ex. if I have 2 templates, "c:/template/tmp1.tpl" and "c:/template/tmp2.tpl", _cachedName() will return "c" as cachedName 2 times.
Test script:
---------------
A solution is to remove ":" in $filename :
function _cachedName($filename)
{
if ('/' == $filename{0} && '/' == substr($this->_cacheRoot, -1)) {
$filename = substr($filename, 1);
}
$filename = str_replace('/', '__', $filename);
// The str_replace below correct the problem
$filename = str_replace(':', '', $filename);
return $this->_cacheRoot. $filename. '.it';
} // _cachedName