Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"Undefined array key" with php 8.2 #73

Open
jniggemann opened this issue Jun 13, 2024 · 1 comment
Open

"Undefined array key" with php 8.2 #73

jniggemann opened this issue Jun 13, 2024 · 1 comment

Comments

@jniggemann
Copy link

jniggemann commented Jun 13, 2024

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
Copy link
Author

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);

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant