pimlie / authres_status

Roundcube plugin that checks the Authentication-Results headers (rfc5451) of your emails and displays the verification status.
Other
34 stars 20 forks source link

"Undefined array key" with php 8.2 #73

Open jniggemann opened 3 weeks ago

jniggemann commented 3 weeks ago

Plugin seems to work as intended but emits the following warning using php 8.2

[13-Jun-2024 17:06:43 Europe/Berlin] PHP Warning:  Undefined array key 1 in /var/www/html/rc/vendor/pimlie/php-dkim/DKIM/Verify.php on line 143
[13-Jun-2024 17:06:43 Europe/Berlin] PHP Warning:  Undefined array key 1 in /var/www/html/rc/vendor/pimlie/php-dkim/DKIM/Verify.php on line 273
jniggemann commented 3 weeks ago

I didn't dig into the code but used array_pad - error is gone and plugin still seems to work.

In case someone wants to try: line 143: list($cHeaderStyle, $cBodyStyle) = array_pad(explode('/', $dkim['c']), 2, null); line 273: list($key, $val) = array_pad(explode('=', trim($part), 2), 2, null);