From ccdd6fb124fa49960f863bcef51bd5d3cd12d2c1 Mon Sep 17 00:00:00 2001 From: Jeroen Bakker Date: Fri, 20 Dec 2024 10:18:07 +0100 Subject: [PATCH] Convert the exec output to string exec outputs an array of lines, handleError() only accepts strings. This causes a TypeError due to strict_types, and is very hard to debug. --- lib/Consumer/ForkCurl.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/Consumer/ForkCurl.php b/lib/Consumer/ForkCurl.php index 8c7a3b5..91b06ef 100644 --- a/lib/Consumer/ForkCurl.php +++ b/lib/Consumer/ForkCurl.php @@ -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; } @@ -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); }