diff --git a/CHANGELOG.md b/CHANGELOG.md index 107901f..46e17ed 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,8 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/) and this project adheres to [Semantic Versioning](http://semver.org/). ## [Unreleased] +### Fixed +- Fix `Phlib\JobQueue\AwsSqs\JobQueue` throwing an exception when `JobQueue->retrieve()` is called on an empty queue and using an ElasticMQ server. ## [3.2.0] - 2025-11-11 ### Changed diff --git a/src/AwsSqs/JobQueue.php b/src/AwsSqs/JobQueue.php index f3d25a8..4f1eb65 100644 --- a/src/AwsSqs/JobQueue.php +++ b/src/AwsSqs/JobQueue.php @@ -104,7 +104,7 @@ public function retrieve(string $queue): ?JobInterface 'MaxNumberOfMessages' => 1, ]); - if (!isset($result['Messages'])) { + if (empty($result['Messages'])) { return null; }