diff options
author | Scott Ullrich <sullrich@su.local> | 2009-09-04 20:57:39 -0400 |
---|---|---|
committer | Scott Ullrich <sullrich@su.local> | 2009-09-04 20:57:39 -0400 |
commit | 2c7ac8dcd77aff76bf4c9805e7ddab933edff46b (patch) | |
tree | d1bf9d78bb470c1a70643d6b5173034896f6b469 /etc/inc/notices.inc | |
parent | 743c30df06fa412346b477b18cc9bab1e2ff1c28 (diff) | |
download | pfsense-2c7ac8dcd77aff76bf4c9805e7ddab933edff46b.zip pfsense-2c7ac8dcd77aff76bf4c9805e7ddab933edff46b.tar.gz |
Ensure file exists
Diffstat (limited to 'etc/inc/notices.inc')
-rw-r--r-- | etc/inc/notices.inc | 8 |
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"); |