Closed
Description
Q | A |
---|---|
Bug report? | yes |
Feature request? | no |
BC Break report? | no |
RFC? | no |
Symfony version | 3.4+ |
Steps to reproduce:
composer create-project symfony/skeleton my-project
cd my-project
composer require --dev profiler webserver
bin/console server:start
- Navigate to http://127.0.0.1:8000/foo/bar
- You get a 404 as expected and the profiler toolbar shows the
dev
environment as expected mkdir public/foo
- Again navigate to http://127.0.0.1:8000/foo/bar
- Notice the profiler toolbar is missing and if you inspect the
$env
var inpublic/index.php
it is an empty string
I think this bug is related to #23799 (https://github.com/symfony/symfony/pull/23799/files#diff-17a9fecf57df3ecbd28ddf129c45ff70R157) but I'm not sure why creating a the /foo
directory causes this issue.
A work around is to change the following in public/index.php
:
if (!isset($_SERVER['APP_ENV'])) {
to:
if (!isset($_SERVER['APP_ENV']) || !$_SERVER['APP_ENV']) {