diff options
author | Colin Smith <colin@pfsense.org> | 2005-07-16 02:34:41 +0000 |
---|---|---|
committer | Colin Smith <colin@pfsense.org> | 2005-07-16 02:34:41 +0000 |
commit | cebc42e6fb4a94098053e07e2fca441edc69aab2 (patch) | |
tree | 91adfd01424db2dbfdc5fa4337a36e09b4f7b2c9 /etc | |
parent | c0c2f4225c7afd30e10d0b096911f2ca5d4c1e54 (diff) | |
download | pfsense-cebc42e6fb4a94098053e07e2fca441edc69aab2.zip pfsense-cebc42e6fb4a94098053e07e2fca441edc69aab2.tar.gz |
If the notices array is empty, unlink our queue file. This fixes are_notices_pending().
Diffstat (limited to 'etc')
-rw-r--r-- | etc/inc/notices.inc | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/etc/inc/notices.inc b/etc/inc/notices.inc index b53a5ed..ed4afe9 100644 --- a/etc/inc/notices.inc +++ b/etc/inc/notices.inc @@ -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; } |