-
Notifications
You must be signed in to change notification settings - Fork 11.5k
Closed
Labels
Description
Laravel Version
12.21.0
PHP Version
8.3
Database Driver & Version
No response
Description
When using the Env
class to update variable values a '
is incorrectly escaped which then breaks the whole site with a HTTP 500 error.
Steps To Reproduce
Use Env::writeVariable
to update a variable. The new value should include a '
, e.g.:
\Illuminate\Support\Env::writeVariable("APP_NAME", "Boy132's Panel", base_path('.env'), true);
Now the .env file will contain:
APP_NAME="Boy132\'s Panel"
The '
has been escaped with an \
which is incorrect in this case.
Correct would be:
APP_NAME="Boy132's Panel"