soup-bowl / wp-simple-smtp

📨 WordPress SMTP plugin. Plain and simple.
https://wordpress.org/plugins/simple-smtp
MIT License
24 stars 5 forks source link

Fatal error: Undefined array key "pass" #129

Closed huubl closed 2 years ago

huubl commented 2 years ago

What WordPress, PHP and Simple SMTP versions are you using? WordPress 6.0.2 PHP 8.0.16 Simple SMTP 1.3.2 Gravity Forms 2.6.7 Bedrock setup

Describe the bug Fatal 500 error when trying to save the Mail Settings of this plugin in WP admin area and have most of the options set by defines:

define('SMTP_HOST', 'mail.mydomain.nl');
define('SMTP_PORT', 465);
define('SMTP_AUTH', 1);
define('SMTP_USER', env('SMTP_USER')); 
define('SMTP_PASS', env('SMTP_PASS'));
define('SMTP_FROM', 'noreply@mydomain.nl');
define('SMTP_SEC', 'ssl');
define('SMTP_NOVERIFYSSL', false);
define('SMTP_LOG', true);
define('SMTP_DISABLE', false);

Undefined array key "pass" https://github.com/soup-bowl/wp-simple-smtp/blob/0a9b6bb0632b491f2acb4dc843a1fbbcff73e4d5/src/settings/class-singular.php#L237

Shouldn't this be: && ! empty( $options['pass'] ) && $this->dummy_password !== $options['pass'] ) Instead of: && ! empty( $options['pass'] && $this->dummy_password !== $options['pass'] ) )?

Steps to reproduce Enable debug and use setup from above.

Expected behavior No errors

Screenshots Undefined-array-key-pass-500-Internal-Server-Error-