Skip to content

Commit a057f2e

Browse files
committed
Configured message key gets overwritten by the first fetched message #84
1 parent 356432e commit a057f2e

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

CHANGELOG.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,13 @@ Updates should follow the [Keep a CHANGELOG](http://keepachangelog.com/) princip
66

77
## [UNRELEASED]
88
### Fixed
9-
- NaN
9+
- Configured message key gets overwritten by the first fetched message #84
1010

1111
### Added
1212
- NaN
1313

1414
### Affected Classes
15-
- NaN
15+
- [Query::class](src/Query/Query.php)
1616

1717
### Breaking changes
1818
- NaN

src/Query/Query.php

+5-5
Original file line numberDiff line numberDiff line change
@@ -242,20 +242,20 @@ public function get() {
242242
$message = Message::make($uid, $msglist, $this->getClient(), $raw_header, $raw_content, $raw_flag, $this->getFetchOptions(), $this->sequence);
243243
switch ($message_key){
244244
case 'number':
245-
$message_key = $message->getMessageNo();
245+
$key = $message->getMessageNo();
246246
break;
247247
case 'list':
248-
$message_key = $msglist;
248+
$key = $msglist;
249249
break;
250250
case 'uid':
251-
$message_key = $message->getUid();
251+
$key = $message->getUid();
252252
break;
253253
default:
254-
$message_key = $message->getMessageId();
254+
$key = $message->getMessageId();
255255
break;
256256

257257
}
258-
$messages->put("$message_key", $message);
258+
$messages->put("$key", $message);
259259
$msglist++;
260260
}
261261
}

0 commit comments

Comments
 (0)