Skip to content

Commit 29c2073

Browse files
Peter Simoncicnicolas-grekas
authored andcommitted
[Runtime] Consider also $_ENV when resolving APP_RUNTIME and APP_RUNTIME_OPTIONS
1 parent 115eebb commit 29c2073

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Internal/autoload_runtime.template

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@ if (!is_object($app)) {
1818
throw new TypeError(sprintf('Invalid return value: callable object expected, "%s" returned from "%s".', get_debug_type($app), $_SERVER['SCRIPT_FILENAME']));
1919
}
2020

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

2424
[$app, $args] = $runtime
2525
->getResolver($app)

0 commit comments

Comments
 (0)