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

Fatal error with PHP8 #20

Open
TomCrawshaw opened this issue Mar 14, 2023 · 1 comment
Open

Fatal error with PHP8 #20

TomCrawshaw opened this issue Mar 14, 2023 · 1 comment

Comments

@TomCrawshaw
Copy link

Running Civi 5.59.2 under Backdrop with PHP8.0, we get a fatal error when registering for an event:
TypeError: in_array(): Argument #2 ($haystack) must be of type array, null given in in_array() (line 40 of /var/www/vhosts/weyarun.org.uk/httpdocs/backdrop_demo/files/civicrm/ext/com.elisseck.civihoneypot-master/civihoneypot.php).

Disabling extension resolves this

@elisseck
Copy link
Owner

Looks like a bug where the array can be empty if the user does not pick an option when configuring. Would accept a PR if you have time, I probably won't be able to get to this for a little while.

As a workaround you can fill out the event settings at the route /civicrm/honeypot/settings. Either check off "protect all events" OR choose at least one event from the list above.

image

@TomCrawshaw I also encourage you to try out this newer extension by Matt Wire that has implemented most of the concepts from this extension and more useful features as well. I think the only thing it doesn't have is IP bans: https://lab.civicrm.org/extensions/formprotection.

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

2 participants