Skip to content

Commit 3fe22ea

Browse files
JeroenBakkerJeroen Bakker
and
Jeroen Bakker
authored
Convert the exec output to string (#239)
exec outputs an array of lines, handleError() only accepts strings. This causes a TypeError due to strict_types, and is very hard to debug. Co-authored-by: Jeroen Bakker <[email protected]>
1 parent 54b41eb commit 3fe22ea

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

lib/Consumer/ForkCurl.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ public function flushBatch(array $messages): bool
4141
exec($cmd2, $output, $exit);
4242

4343
if ($exit !== 0) {
44+
$output = implode(PHP_EOL, $output);
4445
$this->handleError($exit, $output);
4546
return false;
4647
}
@@ -75,6 +76,7 @@ public function flushBatch(array $messages): bool
7576
exec($cmd, $output, $exit);
7677

7778
if ($exit !== 0) {
79+
$output = implode(PHP_EOL, $output);
7880
$this->handleError($exit, $output);
7981
}
8082

0 commit comments

Comments
 (0)