Jake
|
| Posted: 02/18/2005, 4:32 AM |
|
II get the following error message:
Notice: Undefined variable: file_content in Template.php on line 56
-------------------------
function LoadTemplate($filename, $block_name, $encoding = "")
{
if ($encoding == "")
$encoding = $this->out_encoding;
$file_path = $this->templates_path . "/" . $filename;
if (file_exists($file_path))
{
$fh=fopen($file_path, "rb");
if (filesize($file_path))
$file_content = fread($fh, filesize($file_path));
fclose($fh);
$delimiter = $this->delimiter;
$tag_sign = $this->tag_sign;
$begin_block = $this->begin_block;
$end_block = $this->end_block;
// preparing file content for parsing
******************************************Line 56 Below *****************
$file_content = preg_replace("/<!\-\-\s*begin\s*([\w\s]*\w+)\s*\-\->/is", $delimiter . $begin_block . $delimiter . "\\1" . $delimiter, $file_content);
$file_content = preg_replace("/<!\-\-\s*end\s*([\w\s]*\w+)\s*\-\->/is", $delimiter . $end_block . $delimiter . "\\1" . $delimiter, $file_content);
$file_content = preg_replace("/\{(\w+)\}/is", $delimiter . $tag_sign . $delimiter . "\\1" . $delimiter, $file_content);
$this->parse_array = explode($delimiter, $file_content);
$this->position = 0;
$this->length = sizeof($this->parse_array);
// begin parse
$block_names[0] = $this->block_path . "/" . $block_name;
$this->set_block($block_names, false);
}
}
|
|
|
 |
Nicole
Posts: 586
|
| Posted: 02/18/2005, 5:28 AM |
|
Jake,
This is not an error but just a notice. Just ignore it, you can suppress notice reporting in php.ini. Set error_reporint to
error_reporting = E_ALL & ~E_NOTICE
_________________
Regards,
Nicole |
 |
 |
|