Skip to content

Commit

Permalink
Cast seconds to integer
Browse files Browse the repository at this point in the history
  • Loading branch information
RobinHoutevelts committed Jun 8, 2020
1 parent 57e432c commit 332dd89
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/AwsSqsQueue.php
Original file line number Diff line number Diff line change
Expand Up @@ -177,8 +177,8 @@ public function numberOfItems()
public function claimItem($lease_time = 0, $unserialize = true)
{
// This is important to support blocking calls to the queue system.
$waitTimeSeconds = $this->getWaitTimeSeconds();
$claimTimeout = ($lease_time) ? $lease_time : $this->getClaimTimeout();
$waitTimeSeconds = (int) $this->getWaitTimeSeconds();
$claimTimeout = (int) (($lease_time) ? $lease_time : $this->getClaimTimeout());
// If our given claimTimeout is smaller than the allowed waiting seconds
// set the waitTimeSeconds to this value. This is to avoid a long call when
// the worker that called claimItem only has a finite amount of time to wait
Expand Down

0 comments on commit 332dd89

Please sign in to comment.