TypeError: Unsupported operand types: bool + string in Drupal\spammaster\Form\SpamMasterSettingsForm->buildForm() (line 689 of modules/contrib/spammaster/src/Form/SpamMasterSettingsForm.php)

Created on 21 May 2024, about 1 month ago
Updated 28 May 2024, about 1 month ago

Problem/Motivation

On line 689 of the settings form it's concatenating the text for the list of improvements. The very last one - recaptcha v3 - is being added using + instead of . for concatenating strings. If you have recaptcha v3 installed but NOT botbattler, then PHP bails out with this error because it cannot perform "FALSE + 'string'".

Steps to reproduce

Install recaptcha v3 in your site and the spam master module, but don't use botbattler, then go to the settings page.

Proposed resolution

Change the + to . in line 689.

πŸ› Bug report
Status

Fixed

Version

2.44

Component

Code

Created by

πŸ‡¨πŸ‡¦Canada teknocat

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

Production build 0.69.0 2024