From a82cb5aa18e2d5dc886d51f71b224dbd9de83cae Mon Sep 17 00:00:00 2001 From: Chad Horohoe Date: Tue, 20 Feb 2018 17:13:12 -0800 Subject: [PATCH] JobQueueGroup: Improve failed-to-insert error This could possibly use LoggerFactory & friends to use them as parameters, but either way let's sort the entries so they're at least remotely capable of self-grouping. Change-Id: Iaf435093d70add02e2f82e3037c64fec11870979 --- includes/jobqueue/JobQueueGroup.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/includes/jobqueue/JobQueueGroup.php b/includes/jobqueue/JobQueueGroup.php index addc7fc2e1..21f09e5102 100644 --- a/includes/jobqueue/JobQueueGroup.php +++ b/includes/jobqueue/JobQueueGroup.php @@ -468,7 +468,8 @@ class JobQueueGroup { function __destruct() { $n = count( $this->bufferedJobs ); if ( $n > 0 ) { - $type = implode( ', ', array_unique( array_map( 'get_class', $this->bufferedJobs ) ) ); + $type = implode( ', ', array_unique( array_map( 'get_class', $this->bufferedJobs ), + SORT_STRING ) ); trigger_error( __METHOD__ . ": $n buffered job(s) of type(s) $type never inserted." ); } } -- 2.20.1