|
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 |
bimal Smarty Elite
Joined: 19 Apr 2007 Posts: 423
|
Posted: Sat Mar 05, 2016 10:35 pm Post subject: Broke after updating Smarty 3.1.29 - [solved] |
|
|
Possibly the auto include feature stopped working after I updated to latest Smarty. My function {loginlink} was defined elsewhere as `function smarty_function_loginlink($params = array(), &$smarty)`. But now I ended up with an exception:
Code: | <b>Fatal error</b>: Uncaught exception 'Exception' with message 'Class file not found for #smarty_internal_compile_loginlink.' in __\inc.config.php:249
Stack trace:
#0 [internal function]: __search_and_include_class_files('Smarty_Internal...')
#1 [internal function]: spl_autoload_call('Smarty_Internal...')
#2 ___\sysplugins\smarty_internal_templatecompilerbase.php(861): class_exists('Smarty_Internal...')
#3 ___\sysplugins\smarty_internal_templatecompilerbase.php(510): Smarty_Internal_TemplateCompilerBase->callTagCompiler('loginlink', Array, Array)
#4 ___\sysplugins\smarty_internal_templatecompilerbase.php(476): Smarty_Internal_TemplateCompilerBase->compileTag2('loginlink', Array, Array)
#5 ___\sysplugins\smarty_internal_templateparser.php(1630): Smarty_Internal_TemplateCompi in <b>___\inc.config.php</b> on line <b>249</b> |
Last edited by bimal on Fri Mar 11, 2016 6:30 pm; edited 1 time in total |
|
Back to top |
|
U.Tews Administrator
Joined: 22 Nov 2006 Posts: 5068 Location: Hamburg / Germany
|
Posted: Sun Mar 06, 2016 3:46 pm Post subject: |
|
|
I think you have several autoloader installed.
It does look like that one of them does throw an exception when a class could not be found. This is wrong behavior. All aouloader must simply return when no class is found. otherwise it breaks the functionally of the class_exists() function. |
|
Back to top |
|
bimal Smarty Elite
Joined: 19 Apr 2007 Posts: 423
|
Posted: Fri Mar 11, 2016 6:29 pm Post subject: Fixed. |
|
|
Thanks, I was able to continue when I modified my autoloader. |
|
Back to top |
|
AnrDaemon Administrator
Joined: 03 Dec 2012 Posts: 1785
|
Posted: Sat Mar 12, 2016 12:26 am Post subject: |
|
|
Autoloader should never ever throw exceptions. |
|
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
|