- Issue created by @nessunluogo
- ๐ฎ๐ณIndia chetan 11
chetan 11 โ made their first commit to this issueโs fork.
- Status changed to Needs review
about 1 year ago 8:23am 19 December 2023 - Status changed to RTBC
about 1 year ago 9:52am 19 December 2023 - ๐ฎ๐นItaly nessunluogo Tremestieri Etneo (CT)
This is ok for me.
Thanks! - Assigned to pedro-alves
- Status changed to Needs review
about 1 year ago 10:53am 19 December 2023 - ๐ต๐นPortugal pedro-alves
Hi nessunluogo,
Thanks for reporting. Are you by any chance using defunct PHP 5.x?
Regarding your proposed solution to use isset... creates a fatal error:
PHP Fatal error: Cannot use isset() on the result of an expression (you can use "null !== expression" instead) in /modules/spammaster/spammaster.module on line 564So... I'm thinking of replacing isset with !empty
if (!empty($form_state->getValue('field_email')[0]['value']) && NULL !== $form_state->getValue('field_email')[0]['value']) {
I will push version 2.4.Also thanks chetan 11. But there's a few more fixes we need to implement.
- ๐ต๐นPortugal pedro-alves
Hi nessunluogo,
Other users brought to my attention that version 2.4 was packaged with version 2.3.
For some reason drupal package manager gave error after uploading version 2.4 to drupal ftp and presented module version 2.3 as 2.4!!!
I uploaded version 2.5 that looks correct now and should address your issue.
When you have the time please test and post back.Sorry for any inconveniences.
- ๐ฎ๐นItaly nessunluogo Tremestieri Etneo (CT)
Hi pedro-alves, thank you for your reply.
I'm on PHP 8.1 and understand why to use "null !== expression" as alternative to isset().I want to add that while trying to test the issue fork I rolled-back to the 2.3 and got no Warning but a WSOD as anonymous user. I'm not on the dev environment at the moment, but I'll check 2.5 and report ASAP.
- ๐ฎ๐นItaly nessunluogo Tremestieri Etneo (CT)
Updated to 2.5 and I get this couple of warnings:
Warning: Undefined variable $spammasteremail in spammaster_form_validate() (line 575 of modules/contrib/spammaster/spammaster.module).
...
Warning: Undefined variable $spammasteremail in spammaster_form_validate() (line 614 of modules/contrib/spammaster/spammaster.module).As far as I can tell, this can be fixed setting the variable to null before the if section (eg. line 565).
Besides this, I get a WSOD on anonymous user with a GuzzleHttp\Exception\RequestException in my local environment, but this desn't look to be related to this issue, so I'm going to open a new one.
- ๐ต๐นPortugal pedro-alves
oh I see, both warnings (line 575 and 614) are a typo related to previous fix.
line 575:
if (!empty($spammasteremail) || is_array($spammasteremail)) {
should be if empty:
if (empty($spammasteremail) || is_array($spammasteremail)) {
Fixed in version 2.6.Regarding "WSOD on anonymous" please do open a new ticket if related to the module.
Thank you again.
- Status changed to RTBC
12 months ago 8:02am 21 December 2023 - ๐ฎ๐นItaly nessunluogo Tremestieri Etneo (CT)
Nevermind, couldn't reproduce WSOD issue.
- Status changed to Fixed
12 months ago 11:11am 21 December 2023 - ๐ต๐นPortugal pedro-alves
Great. Closing this one now.
Thanks again for reporting. - Status changed to Fixed
12 months ago 11:12am 21 December 2023