Skip to content

Commit

Permalink
Fix #522: Fix SQS driver type error with custom value passed to `queu…
Browse files Browse the repository at this point in the history
…e/listen`
  • Loading branch information
flaviovs authored Feb 21, 2025
1 parent 46b2eff commit 9dd5534
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Yii2 Queue Extension Change Log
2.3.8 under development
-----------------------

- no changes in this release.
- Bug #522: Fix SQS driver type error with custom value passed to `queue/listen` (flaviovs)


2.3.7 April 29, 2024
Expand Down
2 changes: 2 additions & 0 deletions src/drivers/sqs/Command.php
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,8 @@ public function actionListen($timeout = 3)
if (!is_numeric($timeout)) {
throw new Exception('Timeout must be numeric.');
}
$timeout = (int) $timeout;

if ($timeout < 1 || $timeout > 20) {
throw new Exception('Timeout must be between 1 and 20');
}
Expand Down

0 comments on commit 9dd5534

Please sign in to comment.