You signed in with another tab or window.Reload to refresh your session.You signed out in another tab or window.Reload to refresh your session.You switched accounts on another tab or window.Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/Symfony/Component/Process/Process.php
+30-20Lines changed: 30 additions & 20 deletions
Original file line number
Diff line number
Diff line change
@@ -304,19 +304,16 @@ public function start(callable $callback = null/*, array $env = array()*/)
304
304
$inheritEnv =true;
305
305
}
306
306
307
-
$envBackup =array();
308
307
if (null !==$env &&$inheritEnv) {
309
-
foreach ($envas$k =>$v) {
310
-
$envBackup[$k] =getenv($k);
311
-
putenv(false ===$v ||null ===$v ?$k :"$k=$v");
312
-
}
313
-
$env =null;
308
+
$env +=$this->getDefaultEnv();
314
309
}elseif (null !==$env) {
315
310
@trigger_error('Not inheriting environment variables is deprecated since Symfony 3.3 and will always happen in 4.0. Set "Process::inheritEnvironmentVariables()" to true instead.',E_USER_DEPRECATED);
311
+
}else {
312
+
$env =$this->getDefaultEnv();
316
313
}
317
314
if ('\\' ===DIRECTORY_SEPARATOR &&$this->enhanceWindowsCompatibility) {