Call to a member function on a non-object

The problem isn’t with the $name variable but rather with the $_engine variable. It’s currently empty. You need to verify that the path specification to Smarty.class.php is correct.

You might try this to begin your debugging:

$this->_engine = new Smarty();
print_r($this->_engine);

If it turns out that $_engine is correct at that stage then verify that it is still correctly populated within the render() function.

Leave a Comment