[JobQueue] Fixed misuse of array type cast.
authorAaron Schulz <aschulz@wikimedia.org>
Wed, 17 Oct 2012 21:55:46 +0000 (14:55 -0700)
committerAaron Schulz <aschulz@wikimedia.org>
Wed, 17 Oct 2012 21:55:46 +0000 (14:55 -0700)
Change-Id: I5d5f4325827cfb5fc5d0b85f57595541340a08d5

includes/job/JobQueueGroup.php

index 2f94152..69bcf01 100644 (file)
@@ -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 ) {