CodeIgniter Forums

Full Version: Codeigniter 4 running error ???
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I am testing CodeIgniter 4, but I am getting this error:

Fatal error: Default value for parameters with a class type hint can only be NULL in C:\xampp\htdocs\CodeIgniter4-develop\system\Config\DotEnv.php on line 121

What am I missing?
(10-10-2018, 01:34 AM)Miller Wrote: [ -> ]I am testing CodeIgniter 4, but I am getting this error:

Fatal error: Default value for parameters with a class type hint can only be NULL in C:\xampp\htdocs\CodeIgniter4-develop\system\Config\DotEnv.php on line 121

What am I missing?

Which is your PHP version?
Are you renamed env file to .env and too set the baseUrl from .env file correctly?

.env
Code:
app.baseURL = 'http://localhost:8080'
You need to be running PHP 7.1+

Also this should be posted in the CodeIgniter 4 forum topics not here.
Maybe there should be fatal error / exception thrown if the PHP version is less then min requirement ...
I think Lonnie just added that as an issue to check for the version being less than.