-
Notifications
You must be signed in to change notification settings - Fork 23
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Null Handling #6
Comments
I scanned through all of the config files in CodeIgniter and only 3 files had null values: My point, though, is that I don't think null values would be used all that much - forgetting the saved setting and letting it revert back to it's original (or saving an empty string/boolean false) would be much more common. My thinking here is:
Thoughts? |
I would still push for full * Note: Leaving it blank will default to 'log'.
*/
'fileExtension' => '', Even if null values aren't common in the framework they are in libraries. I personally use them heavily; Myth:Auth uses them at very key control points. Empowering these from the service but not the helper seems unduly punishing. |
I think the helper would actually be an easy fix using I can work on a PR if you are amenable to head this direction. |
Oh, interesting, I didn't realize that would work. I guess it makes sense, but I thought with the default being null it wouldn't recognize. Cool. The only other way I was thinking would work well would be another class to represent null, or something, which seemed pretty ugly. Yes, I'm good with that approach. |
Your latest commit points out a problem in the current flow: settings with
null
values. I think this will be a frequent enough need with Config handling that it will merit handling explicitly (maybe types will help?). Handlers should be able to:set()
request to store an overridingnull
valuenull
value response fromget()
requests that should stopThe service and helper will need updating to accommodate these parameters.
The text was updated successfully, but these errors were encountered: