// Set webmaster
$toEmail = getWebmaster();
}
- } elseif ($toEmail == '0') {
+ } elseif (($toEmail == '0') || (is_null($toEmail))) {
// Is the webmaster!
$toEmail = getWebmaster();
}
// 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 = '';