Permalink
Browse files

Added a check to see if we have args before we attempt to access the …

…first item in the payload args to prevent an undefined index error.
  • Loading branch information...
atorres757 committed Nov 1, 2012
1 parent 3955bc8 commit f6334bb3b89a604e36440065b36e0de6ac96207a
Showing with 3 additions and 2 deletions.
  1. +3 −2 lib/Resque/Job.php
View
@@ -230,8 +230,9 @@ public function recreate()
if($status->isTracking()) {
$monitor = true;
}
-
- return self::create($this->queue, $this->payload['class'], $this->payload['args'][0], $monitor);
+ $args = count($this->payload['args'])? $this->payload['args'][0] : $this->payload['args'];
+
+ return self::create($this->queue, $this->payload['class'], $args, $monitor);
}
/**

0 comments on commit f6334bb

Please sign in to comment.