bug #10914 [HttpKernel] added an analyze of environment parameters for built-in server (mauchede)

This PR was submitted for the master branch but it was merged into the 2.3 branch instead (closes #10914).

Discussion
----------

[HttpKernel] added an analyze of environment parameters for built-in server

| Q             | A
| ------------- | ---
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | no
| Fixed tickets | #10208
| License       | MIT
| Doc PR        | -

With the built-in server, it is not possible to use the external parameters: environment variables are only in `$_ENV`.

Commits
-------

696b978 [HttpKernel] added an analyze of environment parameters for built-in server.
This commit is contained in:
Fabien Potencier 2014-08-08 17:50:03 +02:00
commit 61763452b7
2 changed files with 2 additions and 0 deletions

View File

@ -25,6 +25,7 @@ if (is_file($_SERVER['DOCUMENT_ROOT'].DIRECTORY_SEPARATOR.$_SERVER['SCRIPT_NAME'
return false;
}
$_SERVER = array_merge($_SERVER, $_ENV);
$_SERVER['SCRIPT_FILENAME'] = $_SERVER['DOCUMENT_ROOT'].DIRECTORY_SEPARATOR.'app_dev.php';
require 'app_dev.php';

View File

@ -25,6 +25,7 @@ if (is_file($_SERVER['DOCUMENT_ROOT'].DIRECTORY_SEPARATOR.$_SERVER['SCRIPT_NAME'
return false;
}
$_SERVER = array_merge($_SERVER, $_ENV);
$_SERVER['SCRIPT_FILENAME'] = $_SERVER['DOCUMENT_ROOT'].DIRECTORY_SEPARATOR.'app.php';
require 'app.php';