From 80eccf3803282b1cfb719fa84b4cfce465c2d0c8 Mon Sep 17 00:00:00 2001 From: Aaron Schulz Date: Thu, 10 Oct 2013 14:56:11 -0700 Subject: [PATCH] Use max() for job count for sanity Change-Id: If5979ccbede2dd70fcd26b7caae82419ddffe542 --- maintenance/showJobs.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/maintenance/showJobs.php b/maintenance/showJobs.php index 78c2e48e31..afd7c745ba 100644 --- a/maintenance/showJobs.php +++ b/maintenance/showJobs.php @@ -59,7 +59,7 @@ class ShowJobs extends Maintenance { $pending = $queue->getSize(); $claimed = $queue->getAcquiredCount(); $abandoned = $queue->getAbandonedCount(); - $active = $claimed - $abandoned; + $active = max( 0, $claimed - $abandoned ); if ( ( $pending + $claimed ) > 0 ) { $this->output( "{$type}: $pending queued; " . -- 2.20.1