Skip to content

Commit 4700375

Browse files
author
Chris Boulton
committed
Merge pull request #30 from salimane/upstream
replace is_object with is_array when reserving jobs
2 parents cd47df2 + 7a7cfbf commit 4700375

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

lib/Resque.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ public static function redis()
6060
* exist, then create it as well.
6161
*
6262
* @param string $queue The name of the queue to add the job to.
63-
* @param object $item Job description as an object to be JSON encoded.
63+
* @param array $item Job description as an array to be JSON encoded.
6464
*/
6565
public static function push($queue, $item)
6666
{
@@ -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)