Jump to content


Photo

Fatal Error


  • Please log in to reply
1 reply to this topic

#1 Huitz

Huitz
  • Members
  • Pip
  • Newbie
  • 2 posts

Posted 09 April 2006 - 05:47 AM

Hello, I was wondering if you could help me with this. I keep receiving this error: Fatal error: Cannot redeclare class template in /home3/ghostd0/public_html/includes/template.php on line 36

Here is my template.php coding ( starting from line #36 )
class Template {
    var $classname = "Template";

    // variable that holds all the data we'll be substituting into
    // the compiled templates.
    // ...
    // This will end up being a multi-dimensional array like this:
    // $this->_tpldata[block.][iteration#][child.][iteration#][child2.][iteration#][variablename] == value
    // if it's a root-level variable, it'll be like this:
    // $this->vars[varname] == value  or  $this->_tpldata['.'][0][varname] == value
    // array "vars" is added for easier access to data
    var $_tpldata = array('.' => array(0 => array()));
    var $vars;

Can you please tell me what is going wrong? Thank you!!

#2 wildteen88

wildteen88
  • Staff Alumni
  • Advanced Member
  • 10,482 posts
  • LocationUK, Bournemouth

Posted 09 April 2006 - 11:47 AM

Basically that error messahge is saying your are declaring the Template class twice. Which you cannot doas you can only declare one class once.

If you want to modify the Template class then you'll want to do something like:
class Template2 extends Template {

// class code here

}





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users