From 3b2dfb805a10a4136282d5bbf0a82a51b99936c4 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Roland=20H=C3=A4der?= Date: Sat, 20 Oct 2012 19:07:14 +0000 Subject: [PATCH] if is NULL the webmaster's email address will be used instead, made ext-coupon working again --- inc/email-functions.php | 2 +- inc/modules/admin/what-send_coupon.php | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/inc/email-functions.php b/inc/email-functions.php index d854a993ad..e0cf2a251e 100644 --- a/inc/email-functions.php +++ b/inc/email-functions.php @@ -59,7 +59,7 @@ function sendEmail ($toEmail, $subject, $message, $isHtml = 'N', $mailHeader = ' // Set webmaster $toEmail = getWebmaster(); } - } elseif ($toEmail == '0') { + } elseif (($toEmail == '0') || (is_null($toEmail))) { // Is the webmaster! $toEmail = getWebmaster(); } diff --git a/inc/modules/admin/what-send_coupon.php b/inc/modules/admin/what-send_coupon.php index 86a7ac55bb..65995d8c68 100644 --- a/inc/modules/admin/what-send_coupon.php +++ b/inc/modules/admin/what-send_coupon.php @@ -84,8 +84,14 @@ ORDER BY // Get the insert id from the table $couponId = SQL_INSERTID(); + // Init userid array + $adminUserids = array(); + // Load entry while (list($userid) = SQL_FETCHROW($result)) { + // Debug message + //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'NUMS=' . SQL_NUMROWS($result) . ',userid=' . $userid); + // By default no code is unique $isUnique = FALSE; $couponCode = ''; -- 2.39.5