Smarty Forum Index Smarty
The discussions here are for Smarty, a template engine for the PHP programming language.

'Smarty_Internal_Template' not found in Smarty.class.php

 
Post new topic   Reply to topic    Smarty Forum Index -> Smarty 3
View previous topic :: View next topic  
Author Message
mpopp
Smarty Rookie


Joined: 22 Jul 2010
Posts: 6

PostPosted: Fri Jul 23, 2010 5:35 pm    Post subject: 'Smarty_Internal_Template' not found in Smarty.class.php Reply with quote

Hi,

I always get the error message

Fatal error: Class 'Smarty_Internal_Template' not found in lib/Smarty/Smarty.class.php on line 444

unless I add the following code to my __autoload() function:

Code:

if (substr($classname, 0, 15) == "Smarty_Internal") {
    $classname = "Smarty/sysplugins/" . strtolower($classname);
    require_once $classname . ".php";
}


With this code snippet, everything works perfectly.

Is this some sort of bug or did I miss anything? Would be nice to make this work without having to add this.

Thanks!
Back to top
View user's profile Send private message
U.Tews
Administrator


Joined: 22 Nov 2006
Posts: 5053
Location: Hamburg / Germany

PostPosted: Fri Jul 23, 2010 6:33 pm    Post subject: Reply with quote

Smarty 3 does register its own autoloader with spl_autoload_register. If your code has an existing __autoload function then this function must be explicitly registered on the __autoload stack. See http://us3.php.net/manual/en/function.spl-autoload-register.php for further details.
Back to top
View user's profile Send private message
mpopp
Smarty Rookie


Joined: 22 Jul 2010
Posts: 6

PostPosted: Fri Jul 23, 2010 10:29 pm    Post subject: Reply with quote

Thank you! I fixed it in my code like the manual describes, and it works fine Smile.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    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