diff --git a/html/inc/uotd.inc b/html/inc/uotd.inc index 0ab0ec32cb..f34ebf0e14 100644 --- a/html/inc/uotd.inc +++ b/html/inc/uotd.inc @@ -81,7 +81,10 @@ function select_uotd() { // If the number of approved profiles dips below a threshold, // email the sys admin every time we pick a new one. // - if ($result && mysql_num_rows($result) < UOTD_THRESHOLD) { + if (defined('UOTD_ADMIN_EMAIL') + && $result + && mysql_num_rows($result) < UOTD_THRESHOLD + ) { $u = new BoincUser; $u->email_addr = UOTD_ADMIN_EMAIL; $u->name = "UOTD admin";