-
-
Notifications
You must be signed in to change notification settings - Fork 183
Description
Describe the bug
The default account settings doesn't have authentication key, causing an error (or sometimes a notice) when Client tries to set default values based on the valid config keys. The error is thrown by php-imap package, in Client.php L155.
To Reproduce
Steps to reproduce the behavior:
- Run
php artisan tinker - Write into the console
resolve(Webklex\PHPIMAP\Client::class);and hit Enter - In this case a Notice is shown with message
Undefined index: authentication in /var/www/html/vendor/webklex/php-imap/src/Client.php on line 155
In a regular HTTP request, a 500 error is thrown (but same issue).
Expected behavior
Either Client needs to check whether a valid key is present in the default account settings, or authentication key is added to the default account settings, fixing the error.
Screenshots
If applicable, add screenshots to help explain your problem.
Relevant portion of the error message generated by a regular HTTP request:

Woraround/Fix
Publishing the package's config file (i.e., php artisan package:publish --provider Webklex\IMAP\Providers\LaravelServiceProvider) and adding authentication key to accounts.default resolves the issue.
Desktop / Server (please complete the following information):
- OS: Alpine Linux
- PHP: 7.4.7
- Version: 2.0.1
