|
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 |
yarco Smarty Regular
Joined: 20 Mar 2009 Posts: 39
|
Posted: Fri Mar 20, 2009 3:06 pm Post subject: bug report: (seems a bug) configure file need a blank line |
|
|
smarty configure file
error output:
Code: |
Code: 0
Error: Syntax Error in config file "/home/yarco/Public/workspace/code/coto/root/lang/index.conf" on line 69 "NoBody = "-- æ� --"" - Unexpected ""-- æ� --"", expected one of: EOL
File: /home/yarco/Public/workspace/code/coto/coto/entry/smarty3/sysplugins/internal.config_file_compiler.php
Line: 109
|
resolve:
Code: |
NoTime = "-- 无 --"
NoBody = "-- 无 --" ; < if the file end here, it will show the above error
^ that is a blank line
|
but it works fine in previous version in smarty. |
|
Back to top |
|
yarco Smarty Regular
Joined: 20 Mar 2009 Posts: 39
|
Posted: Fri Mar 20, 2009 3:11 pm Post subject: |
|
|
it is not a big problem i think.
it seems some parser need a new line(sometimes happened in c language)...but still feeling unhappy. |
|
Back to top |
|
U.Tews Administrator
Joined: 22 Nov 2006 Posts: 5068 Location: Hamburg / Germany
|
Posted: Fri Mar 20, 2009 3:43 pm Post subject: |
|
|
Yes, the parser expects that every line is terminated by newline. |
|
Back to top |
|
SLX Smarty Rookie
Joined: 19 Nov 2009 Posts: 11 Location: Wroclaw, Poland
|
Posted: Thu Nov 19, 2009 3:50 pm Post subject: |
|
|
It also affect situation where config file is empty. Then the smarty compiler go to infinite loop between
Code: | Smarty_Internal_Config->getCompiledConfig( )
Smarty_Internal_Config->compileConfigSource( ) |
and PHP produce error:
Quote: | Fatal error: Maximum function nesting level of '100' reached, aborting! in ***/sysplugins/smarty_internal_config.php on line 44 |
Needs of new line in config files is some irritating, but I find nice solution. Changing one line in file /sysplugins/smarty_internal_config_file_compiler.php : 44
Code: | From:
$_content = $config->getConfigSource();
to:
$_content = $config->getConfigSource()."\n"; |
Or in file /sysplugins/smarty_internal_config.php : 115
Code: | $this->config_source = file_get_contents($this->getConfigFilepath())."\n"; |
Applies version 3.0b4 (3351) |
|
Back to top |
|
U.Tews Administrator
Joined: 22 Nov 2006 Posts: 5068 Location: Hamburg / Germany
|
Posted: Fri Nov 20, 2009 9:53 pm Post subject: |
|
|
This is fixed in the SVN now. |
|
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
|