From dd3c406af7caa1a66c519b751fc09b50688acbbb Mon Sep 17 00:00:00 2001 From: Laurent VOULLEMIER Date: Wed, 26 Jul 2023 11:02:38 +0200 Subject: [PATCH] Fix property must not be accessed before initialization on SymfonyRuntime::$input --- src/Symfony/Component/Runtime/SymfonyRuntime.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Symfony/Component/Runtime/SymfonyRuntime.php b/src/Symfony/Component/Runtime/SymfonyRuntime.php index a204b48067a7c..34a2097dc0ab3 100644 --- a/src/Symfony/Component/Runtime/SymfonyRuntime.php +++ b/src/Symfony/Component/Runtime/SymfonyRuntime.php @@ -106,7 +106,7 @@ public function __construct(array $options = []) ->usePutenv($options['use_putenv'] ?? false) ->bootEnv($options['project_dir'].'/'.($options['dotenv_path'] ?? '.env'), 'dev', (array) ($options['test_envs'] ?? ['test']), $options['dotenv_overload'] ?? false); - if ($this->input && ($options['dotenv_overload'] ?? false)) { + if (isset($this->input) && ($options['dotenv_overload'] ?? false)) { if ($this->input->getParameterOption(['--env', '-e'], $_SERVER[$envKey], true) !== $_SERVER[$envKey]) { 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)); }