Skip to content

Commit 458fd64

Browse files
author
Salimane Adjao Moustapha
committed
replace is_object with is_array when reserving jobs since Resque::pop actually returns an array instead of an object
1 parent cd47df2 commit 458fd64

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

lib/Resque.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ public static function push($queue, $item)
7373
* return it.
7474
*
7575
* @param string $queue The name of the queue to fetch an item from.
76-
* @return object Decoded item from the queue.
76+
* @return array Decoded item from the queue.
7777
*/
7878
public static function pop($queue)
7979
{
@@ -113,7 +113,7 @@ public static function enqueue($queue, $class, $args = null, $trackStatus = fals
113113
'args' => $args,
114114
));
115115
}
116-
116+
117117
return $result;
118118
}
119119

lib/Resque/Job.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ class Resque_Job
3737
* Instantiate a new instance of a job.
3838
*
3939
* @param string $queue The queue that the job belongs to.
40-
* @param object $payload Object containing details of the job.
40+
* @param array $payload array containing details of the job.
4141
*/
4242
public function __construct($queue, $payload)
4343
{
@@ -84,7 +84,7 @@ public static function create($queue, $class, $args = null, $monitor = false)
8484
public static function reserve($queue)
8585
{
8686
$payload = Resque::pop($queue);
87-
if(!is_object($payload)) {
87+
if(!is_array($payload)) {
8888
return false;
8989
}
9090

0 commit comments

Comments
 (0)