Skip to content

Commit

Permalink
Convert the exec output to string (#239)
Browse files Browse the repository at this point in the history
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 <jeroen.bakker@yoursurprise.com>
  • Loading branch information
JeroenBakker and Jeroen Bakker authored Jan 15, 2025
1 parent 54b41eb commit 3fe22ea
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lib/Consumer/ForkCurl.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ public function flushBatch(array $messages): bool
exec($cmd2, $output, $exit);

if ($exit !== 0) {
$output = implode(PHP_EOL, $output);
$this->handleError($exit, $output);
return false;
}
Expand Down Expand Up @@ -75,6 +76,7 @@ public function flushBatch(array $messages): bool
exec($cmd, $output, $exit);

if ($exit !== 0) {
$output = implode(PHP_EOL, $output);
$this->handleError($exit, $output);
}

Expand Down

0 comments on commit 3fe22ea

Please sign in to comment.