Making it compatible with PHP < 5.5

Making the factory receive the classname
This commit is contained in:
Sebastian Machuca 2016-10-06 16:07:16 +11:00
parent 7d2ce1bc8b
commit de22db6826
No known key found for this signature in database
GPG key ID: 4B3DA17F9CCF39DE
3 changed files with 11 additions and 10 deletions

View file

@ -182,7 +182,7 @@ class Resque_Job implements Resque_JobInterface
}
if ($this->jobFactory !== null) {
$this->instance = $this->jobFactory->create();
$this->instance = $this->jobFactory->create($this->payload['class']);
} else {
$this->instance = new $this->payload['class'];
}