Ensure that the spool path is set
This commit is contained in:
parent
2bfc40d74c
commit
9251d2af6f
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
@ -27,7 +27,7 @@ function spool_post_run($argv, $argc) {
|
|||
|
||||
$path = get_spoolpath();
|
||||
|
||||
if (is_writable($path)){
|
||||
if (($path != '') AND is_writable($path)){
|
||||
if ($dh = opendir($path)) {
|
||||
while (($file = readdir($dh)) !== false) {
|
||||
|
||||
|
|
Loading…
Reference in a new issue