From: Aaron Schulz Date: Wed, 17 Oct 2012 21:55:46 +0000 (-0700) Subject: [JobQueue] Fixed misuse of array type cast. X-Git-Tag: 1.31.0-rc.0~21978 X-Git-Url: https://git.cyclocoop.org/%7B%24admin_url%7Dmembres/cotisations/rappels.php?a=commitdiff_plain;h=fcaba41a86affd0c558524566a540bb3289898d4;p=lhc%2Fweb%2Fwiklou.git [JobQueue] Fixed misuse of array type cast. Change-Id: I5d5f4325827cfb5fc5d0b85f57595541340a08d5 --- diff --git a/includes/job/JobQueueGroup.php b/includes/job/JobQueueGroup.php index 2f9415297c..69bcf011be 100644 --- a/includes/job/JobQueueGroup.php +++ b/includes/job/JobQueueGroup.php @@ -83,7 +83,7 @@ class JobQueueGroup { * @return bool */ public function push( $jobs ) { - $jobs = (array)$jobs; + $jobs = is_array( $jobs ) ? $jobs : array( $jobs ); $jobsByType = array(); // (job type => list of jobs) foreach ( $jobs as $job ) {