From 7ba52288140c639889c2db41fc3f771da0146813 Mon Sep 17 00:00:00 2001 From: Michael Date: Tue, 14 Feb 2017 21:13:00 +0000 Subject: [PATCH] Bugfix: Only delete spool files that are spool files --- include/spool_post.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/include/spool_post.php b/include/spool_post.php index d55b100eda..78384c23af 100644 --- a/include/spool_post.php +++ b/include/spool_post.php @@ -35,7 +35,13 @@ function spool_post_run($argv, $argc) { continue; } $arr = json_decode(file_get_contents($fullfile), true); + if (!is_array($arr)) { + continue; + } $result = item_store($arr); + if ($result == 0) { + continue; + } logger("Spool file ".$file." stored: ".$result, LOGGER_DEBUG); unlink($fullfile); }