|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2020-10-16 15:15 UTC] cmb@php.net
-Status: Open
+Status: Feedback
-Assigned To:
+Assigned To: cmb
[2020-10-16 15:15 UTC] cmb@php.net
[2020-10-25 04:22 UTC] php-bugs at lists dot php dot net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Wed Nov 19 23:00:01 2025 UTC |
Description: ------------ This bug is affecting 7.2.11 and 7.3.0RC4 If calling imap_status() on a series of mailboxes, if the mailbox has no emails in it, imap_status() returns the previous result. I have also tried calling imap_gc() before calling imap_status() and this didn't help either. Test script: --------------- $folders = [ '{localhost:143}INBOX', // Has 3 emails, 2 unseen '{localhost:143}INBOX/NoEmails', // Has no emails ]; $connection = imap_open('{localhost:143}INBOX/NoEmails', 'user', 'password); foreach ($folders as $folder) { $status = imap_status($connection, $folder, SA_ALL); // Changing options has no effect on the result print_r($status); // Always returns the results for INBOX } Expected result: ---------------- stdClass Object ( [flags] => 31 [messages] => 3 [recent] => 0 [unseen] => 2 [uidnext] => 1108 [uidvalidity] => 1527875182 ) stdClass Object ( [flags] => 31 [messages] => 0 [recent] => 0 [unseen] => 0 [uidnext] => 1108 [uidvalidity] => 1527875182 ) Actual result: -------------- stdClass Object ( [flags] => 31 [messages] => 3 [recent] => 0 [unseen] => 2 [uidnext] => 1108 [uidvalidity] => 1527875182 ) stdClass Object ( [flags] => 31 [messages] => 3 [recent] => 0 [unseen] => 2 [uidnext] => 1108 [uidvalidity] => 1527875182 )