Bug #73186 [NEW]: imap_status returns empty object
| From: | jochem dot blok at fasterforward dot nl | Date: | Tue, 27 Sep 2016 15:01:06 +0000 |
| Subject: | Bug #73186 [NEW]: imap_status returns empty object | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-204302@lists.php.net to get a copy of this message | ||
From: jochem dot blok at fasterforward dot nl
Operating system: Ubuntu 14.04
PHP version: 5.6.26
Package: IMAP related
Bug Type: Bug
Bug description:imap_status returns empty object
Description:
------------
imap_status should return an object with properties. This is not the
case with Office365 servers. Requesting the flags command line results
in, what seems to be, valid flags.
Below the responses. Requesting this with imap_status results in an
empty object.
a3 SELECT "INBOX"
* 1 EXISTS
* 1 RECENT
* FLAGS (\Seen \Answered \Flagged \Deleted \Draft $MDNSent)
* OK [PERMANENTFLAGS (\Seen \Answered \Flagged \Deleted \Draft
$MDNSent)] Permanent flags
* OK [UNSEEN 1] Is the first unseen message
* OK [UIDVALIDITY 14] UIDVALIDITY value
* OK [UIDNEXT 155668] The next unique identifier value
a3 OK [READ-WRITE] SELECT completed.
a4 EXAMINE "INBOX"
* 1 EXISTS
* 0 RECENT
* FLAGS (\Seen \Answered \Flagged \Deleted \Draft $MDNSent)
* OK [PERMANENTFLAGS ()] Permanent flags
* OK [UNSEEN 1] Is the first unseen message
* OK [UIDVALIDITY 14] UIDVALIDITY value
* OK [UIDNEXT 155668] The next unique identifier value
a4 OK [READ-ONLY] EXAMINE completed.
The following responses (from a different server) results in the correct
response (an object with properties):
a3 SELECT "INBOX"
* FLAGS (\Answered \Flagged \Deleted \Seen \Draft $Forwarded)
* OK [PERMANENTFLAGS (\Answered \Flagged \Deleted \Seen \Draft
$Forwarded \*)] Flags permitted.
* 382 EXISTS
* 0 RECENT
* OK [UNSEEN 3] First unseen.
* OK [UIDVALIDITY 1286370445] UIDs valid
* OK [UIDNEXT 49620] Predicted next UID
* OK [HIGHESTMODSEQ 3557] Highest
a3 OK [READ-WRITE] Select completed.
a4 EXAMINE "INBOX"
* OK [CLOSED] Previous mailbox closed.
* FLAGS (\Answered \Flagged \Deleted \Seen \Draft $Forwarded)
* OK [PERMANENTFLAGS ()] Read-only mailbox.
* 382 EXISTS
* 0 RECENT
* OK [UNSEEN 3] First unseen.
* OK [UIDVALIDITY 1286370445] UIDs valid
* OK [UIDNEXT 49620] Predicted next UID
* OK [HIGHESTMODSEQ 3557] Highest
a4 OK [READ-ONLY] Select completed.
Test script:
---------------
$connection = '{outlook.office365.com:993/imap/ssl}';
$mbox = imap_open($connection, "user", "password", OP_HALFOPEN)
or die("can't connect: " . imap_last_error());
$status = imap_status($mbox, $connection, SA_ALL);
print_r($status);
Expected result:
----------------
stdClass Object
(
[flags] => 31
[messages] => 388
[recent] => 0
[unseen] => 208
[uidnext] => 49631
[uidvalidity] => 1286370445
)
Actual result:
--------------
stdClass Object
(
[flags] => 0
)
--
Edit bug report at https://bugs.php.net/bug.php?id=73186&edit=1
--
Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=73186&r=trysnapshot54
Try a snapshot (PHP 5.5): https://bugs.php.net/fix.php?id=73186&r=trysnapshot55
Try a snapshot (trunk): https://bugs.php.net/fix.php?id=73186&r=trysnapshottrunk
Fixed in SVN: https://bugs.php.net/fix.php?id=73186&r=fixed
Fixed in release: https://bugs.php.net/fix.php?id=73186&r=alreadyfixed
Need backtrace: https://bugs.php.net/fix.php?id=73186&r=needtrace
Need Reproduce Script: https://bugs.php.net/fix.php?id=73186&r=needscript
Try newer version: https://bugs.php.net/fix.php?id=73186&r=oldversion
Not developer issue: https://bugs.php.net/fix.php?id=73186&r=support
Expected behavior: https://bugs.php.net/fix.php?id=73186&r=notwrong
Not enough info: https://bugs.php.net/fix.php?id=73186&r=notenoughinfo
Submitted twice: https://bugs.php.net/fix.php?id=73186&r=submittedtwice
register_globals: https://bugs.php.net/fix.php?id=73186&r=globals
PHP 4 support discontinued: https://bugs.php.net/fix.php?id=73186&r=php4
Daylight Savings: https://bugs.php.net/fix.php?id=73186&r=dst
IIS Stability: https://bugs.php.net/fix.php?id=73186&r=isapi
Install GNU Sed: https://bugs.php.net/fix.php?id=73186&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=73186&r=float
No Zend Extensions: https://bugs.php.net/fix.php?id=73186&r=nozend
MySQL Configuration Error: https://bugs.php.net/fix.php?id=73186&r=mysqlcfg