Skip to content

Commit

Permalink
Fix offset in DoctrineDriver peekQueue
Browse files Browse the repository at this point in the history
  • Loading branch information
henrikbjorn committed Feb 4, 2014
1 parent c0628c3 commit 50bc626
Showing 1 changed file with 2 additions and 9 deletions.
11 changes: 2 additions & 9 deletions src/Bernard/Driver/DoctrineDriver.php
Original file line number Diff line number Diff line change
Expand Up @@ -130,16 +130,9 @@ public function acknowledgeMessage($queueName, $receipt)
*/
public function peekQueue($queueName, $index = 0, $limit = 20)
{
$query = 'SELECT message FROM bernard_messages WHERE queue = ? LIMIT ?, ?';
$params = array(
$queueName,
$index,
$limit,
);
$query = 'SELECT message FROM bernard_messages WHERE queue = ? LIMIT ' . $index . ', ' . $limit;

$statement = $this->connection->executeQuery($query, $params, array(
'string', 'integer', 'integer'
));
$statement = $this->connection->executeQuery($query, array($queueName));

return $statement->fetchAll(\PDO::FETCH_COLUMN);
}
Expand Down

0 comments on commit 50bc626

Please sign in to comment.