Highfivery / zero-spam-for-wordpress

The WordPress Zero Spam plugin makes blocking spam a cinch without all the bloated options. Just install, activate, and say goodbye to spam.
https://wordpress.org/plugins/zero-spam/
72 stars 32 forks source link

[BUG] core/class-utilities.php - Argument #2 ($haystack) must be of type array, bool given #299

Closed lquidfire closed 2 years ago

lquidfire commented 2 years ago

Hi!

My WordPress site sent me an automated email with the following error message:

Error Details

An error of type E_ERROR was caused in line 109 of the file [REDACTED]/public_html/wp-content/plugins/zero-spam/core/class-utilities.php. Error message: Uncaught TypeError: in_array(): Argument #2 ($haystack) must be of type array, bool given in [REDACTED]/public_html/wp-content/plugins/zero-spam/core/class-utilities.php:109 Stack trace:

0 [REDACTED]/public_html/wp-content/plugins/zero-spam/core/class-utilities.php(109): in_array()

1 [REDACTED]/public_html/wp-content/plugins/zero-spam/modules/registration/class-registration.php(97): ZeroSpam\Core\Utilities::is_email_domain_blocked()

2 [REDACTED]/public_html/wp-includes/class-wp-hook.php(303): ZeroSpam\Modules\Registration\Registration->process_form()

3 [REDACTED]/public_html/wp-includes/plugin.php(189): WP_Hook->apply_filters()

4 [REDACTED]/public_html/wp-includes/user.php(2979): apply_filters()

5 [REDACTED]/public_html/wp-login.php(971): register_new_user()

6 {main}

thrown

================================================================= Extra info:

WordPress version 5.8.2 Current plugin: WordPress Zero Spam (version 5.2.8) PHP version 8.0.13

bmarshall511 commented 2 years ago

@lquidfire Thanks for letting me know, I've found the issue and will be fixed in the next release.