If the notices array is empty, unlink our queue file. This fixes are_notices_pending().

This commit is contained in:
Colin Smith 2005-07-16 02:34:41 +00:00
parent c0c2f4225c
commit cebc42e6fb

View File

@ -103,9 +103,13 @@ function close_notice($id) {
break;
}
}
$queueout = fopen($notice_path, "w");
fwrite($queueout, serialize($queue));
fclose($queueout);
if(count($queue) != 0) {
$queueout = fopen($notice_path, "w");
fwrite($queueout, serialize($queue));
fclose($queueout);
} else {
unlink_if_exists($notice_path);
}
return;
}