-
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
If the controller’s method's parameter has a default value , the program will show 500 error #461
Comments
I have not ran into any instances of this happening. You don't provide the exact error message you were getting, but it sounds pretty close to one that you'd get if you were not running on PHP 7. Can you verify the version of PHP you're using and provide the error message, please? |
my php version is 7.1.3 , and the error message is : 500 (Internal Server Error) |
Weird. That's something completely different than I get. Can you check your PHP error logs to see what the underlying error actually is? On mine, I get an Exception thrown, but that's due to an issue in the debug toolbar. Maybe try turning that off and seeing if that's the issue? |
In the file CodeIgniter , the function handleRequest, the code
If I delete these code ,the program is fine . |
yes, it is the debug Toolbar's problem! |
`<?php namespace App\Controllers;
use CodeIgniter\Controller;
class Home extends Controller
{
public function index($page = 'welcome_message')
{
return view($page);
}
}
`
just modify the Application/Controllers/Home.php's code to this, the program will not work。
The text was updated successfully, but these errors were encountered: