Closed dub34 closed 9 years ago
Should it return the default value if a call to empty
returns true?
i think yes
and I found another problem. if i get setting without section f.e. $value = $settings->get('key'), i get the exception Undefined offset: 1 in ...Settings.php:101.
Of course I can call get with '.key' param
I thought about it some more. False is a valid configuration value. I'm adding default but it will only return the default value if the setting doesn't exist at all.
I'm adding default but it will only return the default value if the setting doesn't exist at all
I think it will be enough
p.s if there are mistaker in the text, please sorry. my english is poor. i`m from ukraine :)
No need to apologize. Thank you for reporting :)
Thank you for this extension. It`s very usefull. But it will be better to add default value in get, when the setting is not set. f.e. $value = $settings->get('section.key',10); If not "section.key" set, we get $value=10;