Hi,
I'm having a problem that I have a hard time understanding. I am getting a
"Fatal error: Call to a member function on a non-object" on a constructor
of a class, that looks like this (simplified):
class phpBB_Template {
var $classname = "Template";
// Root template directory.
var $root = "";
/**
* Constructor. Simply sets the root dir.
*
*/
function phpBB_Template($root = ".")
{ /* Error is reported on this line */
$this->root = $root;
}
}
The line where the error is reported only contains the function's opening
accolade. As far as I understand, this error should only occur if I try to
access a function on a variable that is not an object, but the only
variable I am accessing, is $this, and that one is by definition an object,
right?
Please help!
André