mirror of
https://github.com/slawkens/myaac.git
synced 2025-05-02 20:29:20 +02:00
Ignore arrays in config.lua (fixes experienceStages loading)
Also change version to 0.7.13-dev
This commit is contained in:
parent
af1ec6722b
commit
1578d186c2
@ -1,5 +1,10 @@
|
||||
# Changelog
|
||||
|
||||
## [0.7.13 - not-release-yet]
|
||||
|
||||
### Fixed
|
||||
* Ignore arrays in config.lua (fixes experienceStages loading)
|
||||
|
||||
## [0.7.12 - 18.02.2020]
|
||||
### Fixed
|
||||
* change guild nick function causing crash on TFS 1.x because of invalid characters being accepted
|
||||
|
@ -26,7 +26,7 @@
|
||||
session_start();
|
||||
|
||||
define('MYAAC', true);
|
||||
define('MYAAC_VERSION', '0.7.12');
|
||||
define('MYAAC_VERSION', '0.7.13-dev');
|
||||
define('DATABASE_VERSION', 22);
|
||||
define('TABLE_PREFIX', 'myaac_');
|
||||
define('START_TIME', microtime(true));
|
||||
|
@ -895,6 +895,13 @@ function load_config_lua($filename)
|
||||
if(count($lines) > 0)
|
||||
foreach($lines as $ln => $line)
|
||||
{
|
||||
$line = trim($line);
|
||||
if(@$line[0] === '{' || @$line[0] === '}') {
|
||||
// arrays are not supported yet
|
||||
// just ignore the error
|
||||
continue;
|
||||
}
|
||||
|
||||
$tmp_exp = explode('=', $line, 2);
|
||||
if(strpos($line, 'dofile') !== false)
|
||||
{
|
||||
@ -921,9 +928,11 @@ function load_config_lua($filename)
|
||||
$result[$key] = (string) substr(substr($value, 1), 0, -1);
|
||||
elseif(in_array($value, array('true', 'false')))
|
||||
$result[$key] = ($value == 'true') ? true : false;
|
||||
elseif(substr($value, 0 , 1) == '{' && substr($value, -1 , 1) == '}') {
|
||||
//elseif(substr($value, 0 , 1) == '{' && substr($value, -1 , 1) == '}') {
|
||||
elseif(@$value[0] === '{') {
|
||||
// arrays are not supported yet
|
||||
// just ignore the error
|
||||
continue;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user