From 2c7ac8dcd77aff76bf4c9805e7ddab933edff46b Mon Sep 17 00:00:00 2001 From: Scott Ullrich Date: Fri, 4 Sep 2009 20:57:39 -0400 Subject: Ensure file exists --- etc/inc/notices.inc | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'etc/inc/notices.inc') 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"); -- cgit v1.1