Skip to content

Commit c867d2c

Browse files
committed
fetch_flags default set to true on all methods - doen't make sense to be disabled by default
1 parent d12db36 commit c867d2c

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/IMAP/Folder.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,7 @@ public function setChildren($children = []) {
185185
*
186186
* @return Message|null
187187
*/
188-
public function getMessage($uid, $msglist = null, $fetch_options = null, $fetch_body = false, $fetch_attachment = false, $fetch_flags = false) {
188+
public function getMessage($uid, $msglist = null, $fetch_options = null, $fetch_body = false, $fetch_attachment = false, $fetch_flags = true) {
189189
if (imap_msgno($this->getClient()->getConnection(), $uid) > 0) {
190190
return new Message($uid, $msglist, $this->getClient(), $fetch_options, $fetch_body, $fetch_attachment, $fetch_flags);
191191
}
@@ -210,7 +210,7 @@ public function getMessage($uid, $msglist = null, $fetch_options = null, $fetch_
210210
* @throws GetMessagesFailedException
211211
* @throws MessageSearchValidationException
212212
*/
213-
public function getMessages($criteria = 'ALL', $fetch_options = null, $fetch_body = true, $fetch_attachment = true, $fetch_flags = false, $limit = null, $page = 1, $charset = "UTF-8") {
213+
public function getMessages($criteria = 'ALL', $fetch_options = null, $fetch_body = true, $fetch_attachment = true, $fetch_flags = true, $limit = null, $page = 1, $charset = "UTF-8") {
214214

215215
return $this->query($charset)->where($criteria)->setFetchOptions($fetch_options)->setFetchBody($fetch_body)
216216
->setFetchAttachment($fetch_attachment)->setFetchFlags($fetch_flags)
@@ -237,7 +237,7 @@ public function getMessages($criteria = 'ALL', $fetch_options = null, $fetch_bod
237237
* @deprecated 1.0.5:2.0.0 No longer needed. Use Folder::getMessages('UNSEEN') instead
238238
* @see Folder::getMessages()
239239
*/
240-
public function getUnseenMessages($criteria = 'UNSEEN', $fetch_options = null, $fetch_body = true, $fetch_attachment = true, $fetch_flags = false, $limit = null, $page = 1, $charset = "UTF-8") {
240+
public function getUnseenMessages($criteria = 'UNSEEN', $fetch_options = null, $fetch_body = true, $fetch_attachment = true, $fetch_flags = true, $limit = null, $page = 1, $charset = "UTF-8") {
241241
return $this->getMessages($criteria, $fetch_options, $fetch_body, $fetch_attachment, $fetch_flags, $limit, $page, $charset);
242242
}
243243

@@ -308,7 +308,7 @@ public function getUnseenMessages($criteria = 'UNSEEN', $fetch_options = null, $
308308
* @deprecated 1.2.1:2.0.0 No longer needed. Use Folder::query() instead
309309
* @see Folder::query()
310310
*/
311-
public function searchMessages(array $where, $fetch_options = null, $fetch_body = true, $fetch_attachment = true, $fetch_flags = false, $limit = null, $page = 1, $charset = "UTF-8") {
311+
public function searchMessages(array $where, $fetch_options = null, $fetch_body = true, $fetch_attachment = true, $fetch_flags = true, $limit = null, $page = 1, $charset = "UTF-8") {
312312
$this->getClient()->checkConnection();
313313

314314
return $this->query($charset)->where($where)->setFetchOptions($fetch_options)->setFetchBody($fetch_body)

0 commit comments

Comments
 (0)