dépôts
/
lhc
/
web
/
wiklou.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
22aeca2
)
[JobQueue] Added type-guard checks to JobQueueGroup::push().
author
Aaron Schulz
<aschulz@wikimedia.org>
Wed, 17 Oct 2012 18:38:19 +0000
(11:38 -0700)
committer
Aaron Schulz
<aschulz@wikimedia.org>
Wed, 17 Oct 2012 18:38:24 +0000
(11:38 -0700)
Change-Id: If41820aab396697546361bc83ba6ce26d08311d8
includes/job/JobQueueGroup.php
patch
|
blob
|
history
diff --git
a/includes/job/JobQueueGroup.php
b/includes/job/JobQueueGroup.php
index
7d01a29
..
2f94152
100644
(file)
--- a/
includes/job/JobQueueGroup.php
+++ b/
includes/job/JobQueueGroup.php
@@
-87,7
+87,11
@@
class JobQueueGroup {
$jobsByType = array(); // (job type => list of jobs)
foreach ( $jobs as $job ) {
- $jobsByType[$job->getType()][] = $job;
+ if ( $job instanceof Job ) {
+ $jobsByType[$job->getType()][] = $job;
+ } else {
+ throw new MWException( "Attempted to push a non-Job object into a queue." );
+ }
}
$ok = true;