diff --git a/CHANGELOG.md b/CHANGELOG.md index d7a0dd170..652cce681 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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 diff --git a/src/drivers/sqs/Command.php b/src/drivers/sqs/Command.php index 15474915b..d2b5e288b 100644 --- a/src/drivers/sqs/Command.php +++ b/src/drivers/sqs/Command.php @@ -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'); }