If a path to a scalar setting is expressed with .[0] at the end of the path, Setting::exists will return true, but Setting::lookup will throw SettingNotFoundException.
This appears to relate to the underlying calls:
Setting::exists uses config_setting_get_member
Setting::lookup uses config_setting_lookup
Note:
This issue does not occur with Config::exists and Config::lookup, which both use config_lookup method.
So, simple config file that contains only one key:
parameter = 100
config_setting_get_member(s, "parameter.[0]") will return the setting for "parameter" rather than NULL
If a path to a scalar setting is expressed with
.[0]
at the end of the path,Setting::exists
will return true, butSetting::lookup
will throwSettingNotFoundException
.This appears to relate to the underlying calls:
config_setting_get_member
config_setting_lookup
So, simple config file that contains only one key:
config_setting_get_member(s, "parameter.[0]")
will return the setting for "parameter" rather than NULL