Skip to content

Commit 5c227fe

Browse files
authored
Merge pull request #7706 from kenjis/docs-dotenv-and-credentials
docs: improve description on dotenv and credentials
2 parents 39e9a1d + 69dad6e commit 5c227fe

2 files changed

Lines changed: 14 additions & 5 deletions

File tree

user_guide_src/source/general/configuration.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ The loaded environment variables are accessed using any of the following:
122122

123123
.. literalinclude:: configuration/005.php
124124

125-
.. warning:: Note that your settings from the **.env** file are added to Environment Variables. As a side effect, this means that if your CodeIgniter application is (for example) generating a ``var_dump($_ENV)`` or ``phpinfo()`` (for debugging or other valid reasons) **your secure credentials are publicly exposed**.
125+
.. warning:: Note that your settings from the **.env** file are added to ``$_SERVER`` and ``$_ENV``. As a side effect, this means that if your CodeIgniter application is (for example) generating a ``var_dump($_ENV)`` or ``phpinfo()`` (for debugging or other valid reasons), or a detailed error report in the ``development`` environment is shown, **your secure credentials are publicly exposed**.
126126

127127
Nesting Variables
128128
-----------------

user_guide_src/source/general/errors.rst

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,11 @@ Error Handling
33
##############
44

55
CodeIgniter builds error reporting into your system through Exceptions, both the `SPL collection <https://www.php.net/manual/en/spl.exceptions.php>`_, as
6-
well as a few custom exceptions that are provided by the framework. Depending on your environment's setup,
6+
well as a few exceptions that are provided by the framework.
7+
8+
Depending on your environment's setup,
79
the default action when an error or exception is thrown is to display a detailed error report unless the application
8-
is running under the ``production`` environment. In this case, a more generic message is displayed to
10+
is running under the ``production`` environment. In the ``production`` environment, a more generic message is displayed to
911
keep the best user experience for your users.
1012

1113
.. contents::
@@ -43,12 +45,19 @@ the error handler to function as normal, you can throw a new exception within th
4345
Configuration
4446
=============
4547

46-
By default, CodeIgniter will display all errors in the ``development`` and ``testing`` environments, and will not
48+
Error Reporting
49+
---------------
50+
51+
By default, CodeIgniter will display a detailed error report with all errors in the ``development`` and ``testing`` environments, and will not
4752
display any errors in the ``production`` environment. You can change this by setting the ``CI_ENVIRONMENT`` variable
48-
in the **.env** file.
53+
in the :ref:`.env <dotenv-file>` file.
4954

5055
.. important:: Disabling error reporting DOES NOT stop logs from being written if there are errors.
5156

57+
.. warning:: Note that your settings from the **.env** file are added to ``$_SERVER``
58+
and ``$_ENV``. As a side effect, this means that if the detailed error report
59+
is displayed, **your secure credentials are publicly exposed**.
60+
5261
Logging Exceptions
5362
------------------
5463

0 commit comments

Comments
 (0)