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

Invalid compiled template error message for empty conf file

 
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 -> Bugs
View previous topic :: View next topic  
Author Message
Borgtex
Smarty Rookie


Joined: 28 Mar 2011
Posts: 9

PostPosted: Tue Sep 29, 2015 11:24 am    Post subject: Invalid compiled template error message for empty conf file Reply with quote

There seems to be a problem with how smarty handles empty (0 bytes) conf files.
On a new project I was using version 3.1.8 and all was working fine, but when I changed to the latest (3.1.27) a error message appeared:

Quote:
Invalid compiled template for 'es.conf'


Granted, the file was empty (it will contain spanish translations), but previous versions handled it without problem. Even when I added some variables to the conf file the error persisted, because, for some reason smarty wasn't able to recompile it despite having been modified.

This is how the generated code ([hashcode].es.conf.config.php) in the old version looks like:

Code:
<?php $_config_vars = array (
  'sections' =>
  array (
  ),
  'vars' =>
  array (
  ),
); ?>



And the contents generated in the new version are just...

Code:
1


That's it, just a "1" coming from nowhere

It obviously works after deleting the contents of templates_c folder, but shouldn't be necessary.
Back to top
View user's profile Send private message
U.Tews
Administrator


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

PostPosted: Sat Oct 03, 2015 3:10 pm    Post subject: Reply with quote

This bug is already fixed on github in the master branch.
The fix will be included in the upcoming 3.1.28 release.
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 -> Bugs 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