mirror of
https://github.com/crazywhalecc/static-php-cli.git
synced 2026-07-13 03:45:37 +08:00
trim envs
This commit is contained in:
@@ -72,10 +72,10 @@ class UnixShell
|
|||||||
public function setEnv(array $env): UnixShell
|
public function setEnv(array $env): UnixShell
|
||||||
{
|
{
|
||||||
foreach ($env as $k => $v) {
|
foreach ($env as $k => $v) {
|
||||||
if ($v === '') {
|
if (trim($v) === '') {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
$this->env[$k] = $v;
|
$this->env[$k] = trim($v);
|
||||||
}
|
}
|
||||||
return $this;
|
return $this;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user