summaryrefslogtreecommitdiffstats
path: root/etc/inc
diff options
context:
space:
mode:
authorScott Ullrich <sullrich@su.local>2009-09-04 20:57:39 -0400
committerScott Ullrich <sullrich@su.local>2009-09-04 20:57:39 -0400
commit2c7ac8dcd77aff76bf4c9805e7ddab933edff46b (patch)
treed1bf9d78bb470c1a70643d6b5173034896f6b469 /etc/inc
parent743c30df06fa412346b477b18cc9bab1e2ff1c28 (diff)
downloadpfsense-2c7ac8dcd77aff76bf4c9805e7ddab933edff46b.zip
pfsense-2c7ac8dcd77aff76bf4c9805e7ddab933edff46b.tar.gz
Ensure file exists
Diffstat (limited to 'etc/inc')
-rw-r--r--etc/inc/notices.inc8
1 files changed, 5 insertions, 3 deletions
diff --git a/etc/inc/notices.inc b/etc/inc/notices.inc
index d98b131..354ef01 100644
--- a/etc/inc/notices.inc
+++ b/etc/inc/notices.inc
@@ -209,9 +209,11 @@ function notify_via_smtp($message) {
return;
/* Do NOT send the same message twice */
- $lastmsg = trim(file_get_contents("/var/db/notices_lastmsg.txt"));
- if($lastmsg == $message)
- return;
+ if(file_exists("/var/db/notices_lastmsg.txt")) {
+ $lastmsg = trim(file_get_contents("/var/db/notices_lastmsg.txt"));
+ if($lastmsg == $message)
+ return;
+ }
require_once("smtp.inc");
OpenPOWER on IntegriCloud