Skip to content

Commit

Permalink
[Runtime] Consider also $_ENV when resolving APP_RUNTIME and APP_RUNT…
Browse files Browse the repository at this point in the history
…IME_OPTIONS
  • Loading branch information
Peter Simoncic authored and nicolas-grekas committed Oct 29, 2021
1 parent 115eebb commit 29c2073
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Internal/autoload_runtime.template
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ if (!is_object($app)) {
throw new TypeError(sprintf('Invalid return value: callable object expected, "%s" returned from "%s".', get_debug_type($app), $_SERVER['SCRIPT_FILENAME']));
}

$runtime = $_SERVER['APP_RUNTIME'] ?? %runtime_class%;
$runtime = new $runtime(($_SERVER['APP_RUNTIME_OPTIONS'] ?? []) + %runtime_options%);
$runtime = $_SERVER['APP_RUNTIME'] ?? $_ENV['APP_RUNTIME'] ?? %runtime_class%;
$runtime = new $runtime(($_SERVER['APP_RUNTIME_OPTIONS'] ?? $_ENV['APP_RUNTIME_OPTIONS'] ?? []) + %runtime_options%);

[$app, $args] = $runtime
->getResolver($app)
Expand Down

0 comments on commit 29c2073

Please sign in to comment.