From 03653072a2898adc002f788eba904cd2cf445e97 Mon Sep 17 00:00:00 2001 From: Michael Date: Thu, 16 Feb 2017 20:23:07 +0000 Subject: [PATCH] We have to delete spool files after posting in any case --- include/spool_post.php | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/include/spool_post.php b/include/spool_post.php index 78384c23af..d2c94881bd 100644 --- a/include/spool_post.php +++ b/include/spool_post.php @@ -35,13 +35,19 @@ function spool_post_run($argv, $argc) { continue; } $arr = json_decode(file_get_contents($fullfile), true); + + // If it isn't an array then it is no spool file if (!is_array($arr)) { continue; } - $result = item_store($arr); - if ($result == 0) { + + // Skip if it doesn't seem to be an item array + if (!isset($arr['uid']) AND !isset($arr['uri']) AND !isset($arr['network'])) { continue; } + + $result = item_store($arr); + logger("Spool file ".$file." stored: ".$result, LOGGER_DEBUG); unlink($fullfile); } -- 2.39.5