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

PHP Warnings #8

Open
mhgx opened this issue Dec 12, 2024 · 0 comments
Open

PHP Warnings #8

mhgx opened this issue Dec 12, 2024 · 0 comments

Comments

@mhgx
Copy link

mhgx commented Dec 12, 2024

PHP Warning:  Trying to access array offset on value of type null in lianamailer-gf/includes/class-lianamailerplugin.php on line 127
PHP Warning:  Trying to access array offset on value of type null in lianamailer-gf/includes/class-lianamailerplugin.php on line 128

$list_id = intval( $lianamailer_settings['lianamailer_mailing_list'] ) ?? null;
$consent_id = intval( $lianamailer_settings['lianamailer_consent'] ) ?? null;

intval() never returns null. These probably should be:

$list_id              = intval( $lianamailer_settings['lianamailer_mailing_list'] ?? 0 );
$consent_id           = intval( $lianamailer_settings['lianamailer_consent'] ?? 0 );
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