Closed psuplat closed 2 years ago
Thank you for reporting.
Is this because of database group name or database schema name ?
I think this is because of DotEnv
class replacing export
to empty string during sanitization.
group name. If I change the group name to expor
, but keep the schema name it then works as it should
This is a bug in DotEnv
.
A workaround is to set in the Config file.
PHP Version
8.1
CodeIgniter4 Version
4.2.1
CodeIgniter4 Installation Method
Composer (using
codeigniter4/appstarter
)Which operating systems have you tested for this bug?
Windows
Which server did you use?
cli
Database
PostgreSQL
What happened?
Unable to connect to the database when database group name contains word export, even is it's only a partial name, ie. _exportsdata will also fail.
Steps to Reproduce
Define db group with word
export
in .env file:define this group in app/Config/Database.php:
try to run a query against the db. You will receive
You have not selected a database type to connect to
error messageExpected Output
Query results
Anything else?
No response