Bug #77082 [Opn->Fbk]: Sequential imap_status returns previous folders totals

From: Date: Fri, 16 Oct 2020 15:15:34 +0000
Subject: Bug #77082 [Opn->Fbk]: Sequential imap_status returns previous folders totals
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-229671@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=77082&edit=1 ID: 77082 Updated by: cmb@php.net Reported by: shafer_w2002 at yahoo dot com Summary: Sequential imap_status returns previous folders totals -Status: Open +Status: Feedback Type: Bug Package: IMAP related PHP Version: 7.2.11 -Assigned To: +Assigned To: cmb Block user comment: N Private report: N New Comment: I'm not able to reproduce this. Is this still an issue for you with any of the actively supported PHP versions[1]? [1] <https://www.php.net/supported-versions.php> Previous Comments: ------------------------------------------------------------------------ [2018-10-30 00:39:09] shafer_w2002 at yahoo dot com 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 ) ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=77082&edit=1

« previous php.bugs (#229671) next »