Neo
Neo

Reputation: 2395

Return value of Webklex\PHPIMAP\Connection\Protocols\ImapProtocol::moveMessage() must be of the type boolean, array returned

When connecting to 365 via OAUTH we attempt to move a message to a folder and receive the error

Return value of Webklex\PHPIMAP\Connection\Protocols\ImapProtocol::moveMessage() must be of the type boolean, array returned

Connection settings:

$Token = $this->GetLoginToken();
            $cm = new ClientManager;

            $this->info("IMAP Connecting.");
            $this->oClient = $cm->make([
                'host' => 'outlook.office365.com',
                'port' => 993,
                'encryption' => 'ssl',
                'validate_cert' => true,
                'username' => *removed*, 
                'password' =>  $Token,
                'protocol' => 'imap',
                'authentication' => "oauth"
            ]);

Line producing the error

$Msg->move('Processed', true);

This should just move the message, but as it is complaining about the return type not being a boolean I've no idea where to start! Using version 4.0

Upvotes: 0

Views: 595

Answers (1)

Gert B.
Gert B.

Reputation: 2347

This is a bug in the package Webklex\PHPIMAP in version 4.0. (returns an array instead of the bool return type)

This is a problem that should be fixed by the package developer.

In the newer version of the package this issue is fixed. So an update is needed.

Upvotes: 1

Related Questions