Skip to content

Commit

Permalink
Added a check to see if we have args before we attempt to access the …
Browse files Browse the repository at this point in the history
…first item in the payload args to prevent an undefined index error.
  • Loading branch information
Allen Torres committed Nov 1, 2012
1 parent 3955bc8 commit f6334bb
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions lib/Resque/Job.php
Expand Up @@ -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);
}

/**
Expand Down

0 comments on commit f6334bb

Please sign in to comment.