Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Case sensitive \NoSelect flag check doesn't work for Gmail #469

Open
ChrisExP opened this issue Jan 23, 2024 · 1 comment
Open

Case sensitive \NoSelect flag check doesn't work for Gmail #469

ChrisExP opened this issue Jan 23, 2024 · 1 comment

Comments

@ChrisExP
Copy link

Describe the bug
This is more a bug with Gmail but it returns folders with the flag "\Noselect" instead of "\NoSelect" so the Folder class does not get the no_select attribute set correctly.
I don't know if this would cause problems anywhere else, but maybe the parseAttributes method could check for flags with case insensitive comparisons.

Code to Reproduce
The troubling code section which produces the reported bug.

$client = (new ClientManager)->make($config);
$client->connect();
$client->getFolders(false);

Expected behavior
Folders with the flag "\Noselect" should have the no_select attribute set to true.

Responses
Fetching the folders with the imap connection:

[
  "[Gmail]" => [
    "delimiter" => "/",
    "flags" => [
      "\HasChildren",
      "\Noselect",
    ],
  ],
  "[Gmail]/All Mail" => [
    "delimiter" => "/",
    "flags" => [
      "\All",
      "\HasNoChildren",
    ],
  ],
]

The folders array returned by php-imap:

[
    Webklex\PHPIMAP\Folder {
        +path: "[Gmail]",
        +name: "[Gmail]",
        +full_name: "[Gmail]",
        +children: Webklex\PHPIMAP\Support\FolderCollection {
            all: [],
        },
        +delimiter: "/",
        +no_inferiors: false,
        +no_select: false,
        +marked: false,
        +has_children: true,
        +referral: false,
        +status: ? array,
    },
    Webklex\PHPIMAP\Folder {
        +path: "[Gmail]/All Mail",
        +name: "All Mail",
        +full_name: "[Gmail]/All Mail",
        +children: Webklex\PHPIMAP\Support\FolderCollection {
            all: [],
        },
        +delimiter: "/",
        +no_inferiors: false,
        +no_select: false,
        +marked: false,
        +has_children: false,
        +referral: false,
        +status: ? array,
    },
]

Desktop / Server (please complete the following information):

  • OS: MacOS Sonoma
  • PHP: 8.2
  • Version: 5.5.0
  • Provider Gmail
@fresent
Copy link

fresent commented Feb 5, 2024

+1 Seeing this behavior as well with all Google/Gmail ids.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants