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

Broke after updating Smarty 3.1.29 - [solved]

 
Post new topic   Reply to topic    Smarty Forum Index -> Plugins
View previous topic :: View next topic  
Author Message
bimal
Smarty Elite


Joined: 19 Apr 2007
Posts: 423

PostPosted: Sat Mar 05, 2016 10:35 pm    Post subject: Broke after updating Smarty 3.1.29 - [solved] Reply with quote

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-&gt;callTagCompiler('loginlink', Array, Array)
#4 ___\sysplugins\smarty_internal_templatecompilerbase.php(476): Smarty_Internal_TemplateCompilerBase-&gt;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
View user's profile Send private message Visit poster's website
U.Tews
Administrator


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

PostPosted: Sun Mar 06, 2016 3:46 pm    Post subject: Reply with quote

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
View user's profile Send private message
bimal
Smarty Elite


Joined: 19 Apr 2007
Posts: 423

PostPosted: Fri Mar 11, 2016 6:29 pm    Post subject: Fixed. Reply with quote

Thanks, I was able to continue when I modified my autoloader.
Back to top
View user's profile Send private message Visit poster's website
AnrDaemon
Administrator


Joined: 03 Dec 2012
Posts: 1532

PostPosted: Sat Mar 12, 2016 12:26 am    Post subject: Reply with quote

Autoloader should never ever throw exceptions.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Smarty Forum Index -> Plugins 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