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.

This commit is contained in:
Allen Torres 2012-11-01 09:37:06 -04:00
parent 3955bc8edc
commit f6334bb3b8

View File

@ -230,8 +230,9 @@ class Resque_Job
if($status->isTracking()) { if($status->isTracking()) {
$monitor = true; $monitor = true;
} }
$args = count($this->payload['args'])? $this->payload['args'][0] : $this->payload['args'];
return self::create($this->queue, $this->payload['class'], $this->payload['args'][0], $monitor); return self::create($this->queue, $this->payload['class'], $args, $monitor);
} }
/** /**