when reserving jobs, check if the payload received from popping a queue is a valid object (fix bug whereby jobs are reserved based on an erroneous payload)

This commit is contained in:
Salimane Adjao Moustapha 2011-12-07 17:14:17 +08:00
parent 45c49cf002
commit 68df9854a6

View File

@ -84,7 +84,7 @@ class Resque_Job
public static function reserve($queue) public static function reserve($queue)
{ {
$payload = Resque::pop($queue); $payload = Resque::pop($queue);
if(!$payload) { if(!is_object($payload)) {
return false; return false;
} }