phplist

NOTE:: Before reporting an issue, make sure you are running the latest version, currently 3.3.1


View Issue Details Jump to Notes ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0014241phplist applicationBatch Processingpublic22-04-08 18:0408-11-12 11:57
Reporterplumbley 
PrioritynormalSeverityminorReproducibilityalways
StatusresolvedResolutionfixed 
PlatformOSOS Version
Product Version2.10.5 
Target Version4.0.xFixed in Version2.11.8 
Summary0014241: Bogus negative last batch size if zero batch period while nonzero batch size
DescriptionNonzero batch size with zero batch period produces an odd report during processqueue. Example:
 define("MAILQUEUE_BATCH_SIZE",250);
 define("MAILQUEUE_BATCH_PERIOD",0);
(Reason: using MAILQUEUE_THROTTLE with hourly cron to control batches)

With this (and none to process) process queue reports:
----
Started
Sending in batches of emails
This batch will be 250 emails, because in the last 0 seconds -250 emails were sent
...
---
This problem does not happen if MAILQUEUE_BATCH_PERIOD is set to 1

Diagnosis: processqueue.php line 99-

if ($num_per_batch && $batch_period) {
  $original_num_per_batch = $num_per_batch;
  ...
}

Then lines 296-300:
if ($num_per_batch > 0) {
  ...
  if ($original_num_per_batch != $num_per_batch) {
  ... [batch size difference report]
}

But if $batch_period was zero then $original_num_per_batch is never set.

Maybe fix by setting $original_num_per_batch = $num_per_batch outside of the first test? Or specifically not assume both are nonzero for batch processing?

Best wishes, Mark
TagsNo tags attached.
Attached Files

- Relationships

-  Notes
(0051876)
michiel (manager)
08-11-12 11:57

yes, seems fairly safe to put the assignment before the condition

revision3424


Copyright © 2000 - 2017 MantisBT Team
Powered by Mantis Bugtracker