Skip to content

Commit

Permalink
Convert the exec output to string
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.
  • Loading branch information
Jeroen Bakker committed Dec 20, 2024
1 parent 54b41eb commit ccdd6fb
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 ccdd6fb

Please sign in to comment.