]> git.mxchange.org Git - friendica.git/commitdiff
Bugfix: Only delete spool files that are spool files
authorMichael <heluecht@pirati.ca>
Tue, 14 Feb 2017 21:13:00 +0000 (21:13 +0000)
committerMichael <heluecht@pirati.ca>
Tue, 14 Feb 2017 21:13:00 +0000 (21:13 +0000)
include/spool_post.php

index d55b100edae94bf7a72347a42a3df4dca3b660a6..78384c23af5e8cf26f4ab68a5cd90788c3c2f63a 100644 (file)
@@ -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);
                        }