diff options
-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"); |