|
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 |
schildi Smarty Regular
Joined: 11 Mar 2005 Posts: 81
|
Posted: Mon Nov 02, 2009 2:00 pm Post subject: Smarty3 beta1 - Parsing of Config-Files |
|
|
Hi,
i heavily use a config file to save a tree structure.
i now updated on smarty 3 beta and getting errors now.
config_overwrite is set to false.
can you tell me, if there were made any changes resulting in different results when using these functions
Smarty::config_load(<configFile>, <sectionName>) //both params used
Smarty::get_config_vars();
Smarty::clear_config();
would make it easier to find the origin of the error...
edit:
found something:
Code: | [...]
$smarty->config_load($configFile, "section_name");
$configVars = $smarty->get_config_vars();
[...]
OLD Result: string(12) "section_name"
NEW Result: array(1) { [0]=> string(12) "section_name" }
[...] |
seems as if config_overwrite has no effect? unsure...
thanks & regards |
|
Back to top |
|
U.Tews Administrator
Joined: 22 Nov 2006 Posts: 5068 Location: Hamburg / Germany
|
Posted: Mon Nov 02, 2009 5:02 pm Post subject: |
|
|
Currently I don't understand your post.
What do you mean by OLD result and NEW result?
If you call $smarty->get_config_vars(); with no parameter it does return an array of the loaded config variable names. |
|
Back to top |
|
schildi Smarty Regular
Joined: 11 Mar 2005 Posts: 81
|
Posted: Tue Nov 03, 2009 7:28 am Post subject: |
|
|
sorry, i'am often to short with my explanations.
but definitely something has changed - otherwise the 3beta version would produce equal results.
regarding to OLD and NEW result i just wanted to give a hint. it shows the return value of
Code: | $smarty->config_load($configFile, "section_name");
$configVars = $smarty->get_config_vars(); |
in case of config_overwrite is set to false when using the current stable 2.x smarty version (=OLD result) and when using the 3b version (=NEW result).
the mentioned lines of code are part of a recursive funtion, so they are called several times. each section within the config file is a node of a tree in my model. |
|
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
|