Summary
In notification queue mail aggregation, attachment merge uses $emails['id']['attachments'] instead of $emails[$id]['attachments'].
Impact
- Existing attachments for the current aggregation bucket may be skipped/lost.
- Can trigger undefined-index notices depending on runtime settings.
Location
thold_functions.php, notification queue processing branch near:
$emails[$id]['attachments'] += array_merge($emails['id']['attachments'], $attachments);
Expected
Use the computed $id bucket and a proper merge strategy for attachment arrays.