]> git.mxchange.org Git - mailer.git/commitdiff
if is NULL the webmaster's email address will be used instead, made ext-coupon worki...
authorRoland Häder <roland@mxchange.org>
Sat, 20 Oct 2012 19:07:14 +0000 (19:07 +0000)
committerRoland Häder <roland@mxchange.org>
Sat, 20 Oct 2012 19:07:14 +0000 (19:07 +0000)
inc/email-functions.php
inc/modules/admin/what-send_coupon.php

index d854a993ad655baa404b108be27f2450aff5da7c..e0cf2a251e3889e9ddeb2fcb8ba1c0ac42245c37 100644 (file)
@@ -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();
        }
index 86a7ac55bb74485d35cbeb5749ffe7b9afa93fb5..65995d8c68e80a95cec64ae15c9091f9446f46b0 100644 (file)
@@ -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 = '';