From e1cac1e31dc74ee18e2b4b79d7ad01fe0cbaa4db Mon Sep 17 00:00:00 2001 From: Aaron Guise Date: Thu, 24 Oct 2024 16:26:31 +1300 Subject: [PATCH] =?UTF-8?q?fix:=20Don't=20break=20on=20whitespace.=20=20He?= =?UTF-8?q?lpful=20for=20JSON=20=F0=9F=90=9B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/UglyQueue.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/UglyQueue.php b/src/UglyQueue.php index ce96f54..ac21d54 100644 --- a/src/UglyQueue.php +++ b/src/UglyQueue.php @@ -269,7 +269,7 @@ class UglyQueue implements \Serializable, \SplSubject, \Countable $data = array(); $start_line = $lineCount - $count; $i = 0; - while (($line = fscanf($queueFileHandle, "%s\t%s\n")) !== false && $i < $lineCount) + while (($line = fscanf($queueFileHandle, "%s\t%[^\n]")) !== false && $i < $lineCount) { if ($i++ >= $start_line) {