-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
Bug: slash_item() errors when asked for a configuration item which doesn't exist #5967
Comments
Thank you for taking time. You are correct. This is a bug, but for what do you use this function? |
This function is used in HTML helper, so we can't remove. |
I was looking for the quickest/simplest way to display a config item value in a view, and was evaluating this function when I came across the issue. My use-case has since changed and I no longer use this function, but still thought it a simple bug worth raising |
I'll take it |
What a strange function. I assume this is some CI3 code that rolled in and hasn't had a pass in a long time. It's also somewhat erroneous, because the @aletoropov Thanks for stepping in! |
PHP Version
8.1
CodeIgniter4 Version
4.1.9
CodeIgniter4 Installation Method
Manual (zip or tar.gz)
Which operating systems have you tested for this bug?
Linux
Which server did you use?
cli-server (PHP built-in webserver)
Database
No response
What happened?
slash_item
inSys\Common
errors when the configuration item doesn’t exist, which is contrary to expected outcome as per the documentionSteps to Reproduce
The error that is displayed is this:-
Expected Output
As per the documentation, the return should be
null
when a configuration doesn't existAnything else?
I've never done a pull request before, but can attempt to do my first one if required
However I have identified what I believe to be the cause of this and here is the updated
slash_item
code forCommon.php
The text was updated successfully, but these errors were encountered: