From: Chad Horohoe Date: Wed, 21 Feb 2018 01:13:12 +0000 (-0800) Subject: JobQueueGroup: Improve failed-to-insert error X-Git-Tag: 1.31.0-rc.0~525^2 X-Git-Url: http://git.cyclocoop.org/%7B%24www_url%7Dadmin/compta/pie.php?a=commitdiff_plain;h=a82cb5aa18e2d5dc886d51f71b224dbd9de83cae;p=lhc%2Fweb%2Fwiklou.git 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 --- 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." ); } }