]> git.mxchange.org Git - friendica.git/blobdiff - include/items.php
Merge pull request #3199 from annando/issue-3196
[friendica.git] / include / items.php
index 1e38e3fdb424efe24c1fc005790a82eb07c12d00..24eb1b30fb7b97c823238d2a2989b9d9413b589e 100644 (file)
@@ -860,9 +860,12 @@ function item_store($arr,$force_parent = false, $notify = false, $dontcache = fa
                // We use "microtime" to keep the arrival order and "mt_rand" to avoid duplicates
                $file = 'item-'.round(microtime(true) * 10000).'-'.mt_rand().'.msg';
 
-               $spool = get_spoolpath().'/'.$file;
-               file_put_contents($spool, json_encode($arr));
-               logger("Item wasn't stored - Item was spooled into file ".$file, LOGGER_DEBUG);
+               $spoolpath = get_spoolpath();
+               if ($spoolpath != "") {
+                       $spool = $spoolpath.'/'.$file;
+                       file_put_contents($spool, json_encode($arr));
+                       logger("Item wasn't stored - Item was spooled into file ".$file, LOGGER_DEBUG);
+               }
                return 0;
        }