From b170d9d7582764226139c7a2a9d6b5a2d953bfb0 Mon Sep 17 00:00:00 2001 From: Ulf Gebhardt Date: Fri, 27 Oct 2023 21:53:14 +0200 Subject: [PATCH] fix library to show errors and not throw when there is arrays involved --- lib/GitRepo.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/GitRepo.php b/lib/GitRepo.php index f8f94d2..a4623b0 100644 --- a/lib/GitRepo.php +++ b/lib/GitRepo.php @@ -189,8 +189,9 @@ class GitRepo { $env = array_merge($_ENV, $this->envopts); } $cwd = $this->repo_path; + $env['argv'] = null; $resource = proc_open($command, $descriptorspec, $pipes, $cwd, $env); - + $stdout = stream_get_contents($pipes[1]); $stderr = stream_get_contents($pipes[2]); foreach ($pipes as $pipe) { @@ -198,7 +199,7 @@ class GitRepo { } $status = trim(proc_close($resource)); - //if ($status) throw new \Exception($stderr); + if ($status) throw new \Exception($stderr); return $stdout; }