From: sblackstone at gmail dot com
Operating system: OSX Leopard
PHP version: 5.2.6
PHP Bug Type: *General Issues
Bug description: imap_getsubscribed clobbers attributes
Description:
------------
The documentation for imap_getsubscribed notes the following:
Identical to imap_getmailboxes(), except that it only returns mailboxes
that the user is subscribed to.
However getsubscribed clobbers the attributes value and returns 0.
Reproduce code:
---------------
<?
$imap = imap_open("{localhost:143/notls}","username","password");
$results_bad = imap_getSubscribed($imap, "{localhost:143/notls}", "*");
// Note: I just picked an arbitrary mailbox in the results items below
// You need to pick a value that has children or just print the whole
// array.
print_r($results_bad[1]);
$results_good = imap_getmailboxes($imap, "{localhost:143/notls}", "*");
print_r($results_good[1]);
?>
Expected result:
----------------
stdClass Object
(
[name] => {localhost:143/notls}SOMEMAILBOX
[attributes] => 64
[delimiter] => .
)
Actual result:
--------------
stdClass Object
(
[name] => {localhost:143/notls}SOMEMAILBOX
[attributes] => 0
[delimiter] => .
)
--
Edit bug report at http://bugs.php.net/?id=45487&edit=1
--
Try a CVS snapshot (PHP 5.2):
http://bugs.php.net/fix.php?id=45487&r=trysnapshot52
Try a CVS snapshot (PHP 5.3):
http://bugs.php.net/fix.php?id=45487&r=trysnapshot53
Try a CVS snapshot (PHP 6.0):
http://bugs.php.net/fix.php?id=45487&r=trysnapshot60
Fixed in CVS: http://bugs.php.net/fix.php?id=45487&r=fixedcvs
Fixed in release:
http://bugs.php.net/fix.php?id=45487&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=45487&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=45487&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=45487&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=45487&r=support
Expected behavior: http://bugs.php.net/fix.php?id=45487&r=notwrong
Not enough info:
http://bugs.php.net/fix.php?id=45487&r=notenoughinfo
Submitted twice:
http://bugs.php.net/fix.php?id=45487&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=45487&r=globals
PHP 4 support discontinued: http://bugs.php.net/fix.php?id=45487&r=php4
Daylight Savings: http://bugs.php.net/fix.php?id=45487&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=45487&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=45487&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=45487&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=45487&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=45487&r=mysqlcfg