php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #40087 imap_getmailboxes() gives a folder two times with different attributes
Submitted: 2007-01-10 07:59 UTC Modified: 2008-07-29 01:00 UTC
Votes:3
Avg. Score:4.7 ± 0.5
Reproduced:2 of 2 (100.0%)
Same Version:2 (100.0%)
Same OS:2 (100.0%)
From: scalero at datadec dot es Assigned: iliaa (profile)
Status: No Feedback Package: IMAP related
PHP Version: 5.2.1 OS: Red Hat Enterprise Linux AS 4
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: scalero at datadec dot es
New email:
PHP Version: OS:

 

 [2007-01-10 07:59 UTC] scalero at datadec dot es
Description:
------------
Something very strange is happening me when I create a structure of folders like the following:

	INBOX
	  test
	    test.aaa
	    test.bbb
	  test second
	    test second.ccc  
	    test second.ddd

I use the following versions:
Horde		3.1.3
IMP		H3 (4.1.3)
PHP		4.4.4
c-client	imap-2004g
cyrus		2.2.10

I have tried to update c-client to the version 'imap-2006d' but I have had this problem: http://bugs.php.net/bug.php?id=39401

Reproduce code:
---------------
imap_getmailboxes($this->_getStream(), "{localhost:1143/imap/notls}", "%");

Expected result:
----------------
I expect each folder appears only one time with its appropriate attributes.



Actual result:
--------------
var_dump() exit:
----------------

array(4) {
  [0]=>
  object(stdClass)(3) {
    ["name"]=>
    string(32) "{localhost:1143/imap/notls}INBOX"
    ["attributes"]=>
    int(1)
    ["delimiter"]=>
    string(1) "."
  }
  [1]=>
  object(stdClass)(3) {
    ["name"]=>
    string(31) "{localhost:1143/imap/notls}test"
    ["attributes"]=>
    int(64)
    ["delimiter"]=>
    string(1) "."
  }
  [2]=>
  object(stdClass)(3) {
    ["name"]=>
    string(38) "{localhost:1143/imap/notls}test second"
    ["attributes"]=>
    int(32)
    ["delimiter"]=>
    string(1) "."
  }
  [3]=>
  object(stdClass)(3) {
    ["name"]=>
    string(31) "{localhost:1143/imap/notls}test"
    ["attributes"]=>
    int(34)
    ["delimiter"]=>
    string(1) "."
  }
}

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2007-01-11 17:04 UTC] scalero at datadec dot es
It don't work, now with:

PHP Version: 5.2.1RC3-dev (latest)
c-client: imap-2006d (latest)

it reproduces the same behavior. The 'test' folder appears without its children folders.

Greetings.
 [2007-01-12 08:36 UTC] scalero at datadec dot es
<?php
// I use Cyrus 2.2.10
$imapconn = imap_open("{localhost:143}INBOX","testuser","testuser"); 
$mailboxes = imap_getmailboxes($imapconn, "{localhost:143/imap/notls}", "%");
$errors = imap_errors();

var_dump($mailboxes);
var_dump($errors);
?>


And this is the result:
array(4) {
  [0]=>
  object(stdClass)#1 (3) {
    ["name"]=>
    string(32) "{localhost:1143/imap/notls}INBOX"
    ["attributes"]=>
    int(1)
    ["delimiter"]=>
    string(1) "."
  }
  [1]=>
  object(stdClass)#2 (3) {
    ["name"]=>
    string(31) "{localhost:1143/imap/notls}test"
    ["attributes"]=>
    int(64)
    ["delimiter"]=>
    string(1) "."
  }
  [2]=>
  object(stdClass)#3 (3) {
    ["name"]=>
    string(38) "{localhost:1143/imap/notls}test second"
    ["attributes"]=>
    int(32)
    ["delimiter"]=>
    string(1) "."
  }
  [3]=>
  object(stdClass)#4 (3) {
    ["name"]=>
    string(31) "{localhost:1143/imap/notls}test"
    ["attributes"]=>
    int(34)
    ["delimiter"]=>
    string(1) "."
  }
}
bool(false)


Like you can see, the 'test' folder appears two times and the first time it shows a 64 attributes value, but the test folder has the childrens:

"test.aaa" and "test.bbb"
 [2008-07-29 01:00 UTC] php-bugs at lists dot php dot net
No feedback was provided for this bug for over a week, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".
 
PHP Copyright © 2001-2020 The PHP Group
All rights reserved.
Last updated: Mon Oct 26 15:01:24 2020 UTC