Smarty Forum Index Smarty
WARNING: All discussion is moving to https://reddit.com/r/smarty, please go there! This forum will be closing soon.

Fatal error: Uncaught Error

 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Smarty Forum Index -> Smarty 3
View previous topic :: View next topic  
Author Message
Ashenafi Alemu
Smarty n00b


Joined: 25 Jan 2018
Posts: 2

PostPosted: Thu Jan 25, 2018 5:45 am    Post subject: Fatal error: Uncaught Error Reply with quote

I am new to Smarty and I just used smarty in the code below and the following error message kicked my ass: Fatal error: Uncaught Error: Call to a member function _callExternalMethod() on null in C:\tshirtshop\libs\smarty\sysplugins\smarty_internal_data.php:241 Stack trace: #0 C:\tshirtshop\presentation\application.php(12): Smarty_Internal_Data->__call('Smarty', Array) #1 C:\tshirtshop\index.php(7): Application->__construct() #2 {main} thrown in C:\tshirtshop\libs\smarty\sysplugins\smarty_internal_data.php on line 241




<?php
// Reference Smarty library
require_once SMARTY_DIR . 'Smarty.class.php';
/* Class that extends Smarty, used to process and display Smarty
files */
class Application extends Smarty
{
// Class constructor
public function __construct()
{
// Call Smarty's constructor
parent::Smarty();
// Change the default template directories
$this->template_dir = TEMPLATE_DIR;
$this->compile_dir = COMPILE_DIR;
$this->config_dir = CONFIG_DIR;
}
}
?>
Back to top
View user's profile Send private message
AnrDaemon
Administrator


Joined: 03 Dec 2012
Posts: 1785

PostPosted: Thu Jan 25, 2018 2:22 pm    Post subject: Reply with quote

Most likely you did not install Smarty correctly, since the error is thrown from inside the library.
Back to top
View user's profile Send private message
Ashenafi Alemu
Smarty n00b


Joined: 25 Jan 2018
Posts: 2

PostPosted: Fri Jan 26, 2018 7:39 am    Post subject: Reply with quote

I got it...smarty installation was not a problem...I just changed parent:Smarty() to parent::__construct(); and it works well
Back to top
View user's profile Send private message
Display posts from previous:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Smarty Forum Index -> Smarty 3 All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group
Protected by Anti-Spam ACP