php-imap icon indicating copy to clipboard operation
php-imap copied to clipboard

Client->createFolder() fails when folder name contains double quotes

Open bartnv opened this issue 1 year ago • 0 comments

Describe the bug Client->createFolder() fails with a TypeError on the return value when folder name contains double quotes. The IMAP server (in my case Dovecot 2.3.13) creates the folder succesfully, but createFolder() hits this error trying to return the result:

PHP Fatal error:  Uncaught TypeError: Webklex\PHPIMAP\Client::createFolder(): Return value must be of type Webklex\PHPIMAP\Folder, null returned in /{redacted}/vendor/webklex/php-imap/src/Client.php:579

Used config Nothing relevant.

Code to Reproduce $client->createFolder('test"test');

Expected behavior The function returns the Folder class of the created folder.

Screenshots Not applicable.

Desktop / Server (please complete the following information):

  • OS: Debian 11
  • PHP: 8.1
  • Version: 4.1.2
  • Provider: Dovecot 2.3.13 on local server

Additional context None.

bartnv avatar Mar 18 '24 12:03 bartnv