-
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: 'method' is an empty string in PATH_INFO causes Unhandled Exception #2965
Labels
bug
Verified issues on the current code behavior or pull requests that will fix them
Comments
willnode
added
the
bug
Verified issues on the current code behavior or pull requests that will fix them
label
May 10, 2020
There's a workaround that works for me: CodeIgniter4/system/Router/Router.php Lines 231 to 236 in a063f14
I changed them into:
However I'm not sure if this a good bugfix as a PR. |
Additional info: I'm using |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Describe the bug
When running
php spark serve
, I noticed that if I set this toPATH_INFO
CodeIgniter4/app/Config/App.php
Line 53 in a063f14
And navigate to URL
localhost:8080/home/
, causesErrorException: Unitialized string offset: 0
inCodeIgniter4/system/CodeIgniter.php
Line 865 in a063f14
Because
$this->method
is""
.CodeIgniter 4 version
Version 4.0.3 release (
in latest develop, it's just shows 404 page, skipping the actual error and throwssorry I forgot that by default CI is in production mode)PageNotFoundException::forMethodNotFound
, probably because recent changes in error reporting level?Affected module(s)
None, I think.
Expected behavior, and steps to reproduce if appropriate
It should render the same page as
localhost:8080/
orlocalhost:8080/home/index
Context
The text was updated successfully, but these errors were encountered: