Skip to content

Commit

Permalink
QA: Stop mailer errors and add frequency to debounce
Browse files Browse the repository at this point in the history
- Without the frequency, we can not prune the entries via the maintenance script.
  • Loading branch information
TheWitness committed Jan 17, 2025
1 parent 130f167 commit 39821b1
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions lib/functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -5322,7 +5322,7 @@ function mailer(array|string $from, array|string $to, null|array|string $cc = nu
$body = $body ?? '';

// Create the PHPMailer instance
$mail = new PHPMailer\PHPMailer\PHPMailer;
$mail = new PHPMailer\PHPMailer;

// Set a reasonable timeout of 5 seconds
$timeout = read_config_option('settings_smtp_timeout');
Expand Down Expand Up @@ -8848,8 +8848,9 @@ function debounce_run_notification($id, $frequency = 7200) {

if (empty($last_timestamp) || $now - $last_timestamp > $frequency) {
$current = array(
'id' => $id,
'timestamp' => $now,
'id' => $id
'frequency' => $frequency
);

set_config_option($key, json_encode($current));
Expand Down

0 comments on commit 39821b1

Please sign in to comment.