8000 Fix property must not be accessed before initialization on SymfonyRun… · symfony/symfony@dd3c406 · GitHub
[go: up one dir, main page]

Skip to content

Commit dd3c406

Browse files
committed
Fix property must not be accessed before initialization on SymfonyRuntime::$input
1 parent 42d9d7c commit dd3c406

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Symfony/Component/Runtime/SymfonyRuntime.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ public function __construct(array $options = [])
106106
->usePutenv($options['use_putenv'] ?? false)
107107
->bootEnv($options['project_dir'].'/'.($options['dotenv_path'] ?? '.env'), 'dev', (array) ($options['test_envs'] ?? ['test']), $options['dotenv_overload'] ?? false);
108108

109-
if ($this->input && ($options['dotenv_overload'] ?? false)) {
109+
if (isset($this->input) && ($options['dotenv_overload'] ?? false)) {
110110
if ($this->input->getParameterOption(['--env', '-e'], $_SERVER[$envKey], true) !== $_SERVER[$envKey]) {
111111
throw new \LogicException(sprintf('Cannot use "--env" or "-e" when the "%s" file defines "%s" and the "dotenv_overload" runtime option is true.', $options['dotenv_path'] ?? '.env', $envKey));
112112
}

0 commit comments

Comments
 (0)
0