 |
Smarty
WARNING: All discussion is moving to https://reddit.com/r/smarty, please go there! This forum will be closing soon. |
|
View previous topic :: View next topic |
Author |
Message |
mpopp Smarty Rookie
Joined: 22 Jul 2010 Posts: 6
|
Posted: Fri Jul 23, 2010 5:35 pm Post subject: 'Smarty_Internal_Template' not found in Smarty.class.php |
|
|
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 |
|
U.Tews Administrator
Joined: 22 Nov 2006 Posts: 5068 Location: Hamburg / Germany
|
Posted: Fri Jul 23, 2010 6:33 pm Post subject: |
|
|
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 |
|
mpopp Smarty Rookie
Joined: 22 Jul 2010 Posts: 6
|
Posted: Fri Jul 23, 2010 10:29 pm Post subject: |
|
|
Thank you! I fixed it in my code like the manual describes, and it works fine . |
|
Back to top |
|
|
|
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
|