Home » HTML » HTML_Template_Xipe » Bug #2502
Missing "else"
Details
| Submitted | 2004-10-11 15:53 UTC |
|---|---|
| From | as at mindcom dot de |
| Status | Suspended |
| Package | HTML_Template_Xipe |
| PHP Version | Irrelevant |
| OS | Irrelevant |
| Roadmaps | (Not assigned) |
Comments
[2004-10-11 15:53 UTC] as at mindcom dot de
Description:
------------
Main.php:
function _getCompiledFilePrefix()
missing "else":
if( strpos( $this->getOption('compileDir'),
$_SERVER['DOCUMENT_ROOT'] )!==0 )
{
...
}
else <- this is missing :)
{
$compileDir = $this->getOption('compileDir');
}
[2004-10-16 22:45 UTC] tobias dot eberle at gmx dot de
This does not fix the bug. The mistake is part of the if clause: !== should be ===:
correct code (line 306ff):
if( strpos( $this->getOption('compileDir') , $_SERVER['DOCUMENT_ROOT'] )===0 )
{
$compileDir = preg_replace('/^\//' , '' , $this->getOption('compileDir') ); // strip of a leading '/' to be sure not to have 2 slashes there :-)
$this->setOption( 'compileDir' , $this->getOption('templateDir').DIRECTORY_SEPARATOR.$compileDir);
}