Error: Call to a member function setErrorByName() on null

Created on 16 December 2022, almost 2 years ago
Updated 29 April 2023, over 1 year ago

Problem/Motivation

When submitting(?) a form, drupal gives the following error:

Error: Call to a member function setErrorByName() on null in Drupal\spammaster\SpamMasterElusiveService->spamMasterElusiveCheck() (regel 300 van H:\laragon\www\metalfans\modules\contrib\spammaster\src\SpamMasterElusiveService.php)
#0 H:\laragon\www\metalfans\modules\contrib\spammaster\src\EventSubscriber\SpamMasterFirewallSubscriber.php(161): Drupal\spammaster\SpamMasterElusiveService->spamMasterElusiveCheck(Array)
#1 [internal function]: Drupal\spammaster\EventSubscriber\SpamMasterFirewallSubscriber->checkForRedirection(Object(Symfony\Component\HttpKernel\Event\RequestEvent), 'kernel.request', Object(Drupal\Component\EventDispatcher\ContainerAwareEventDispatcher))
#2 H:\laragon\www\metalfans\core\lib\Drupal\Component\EventDispatcher\ContainerAwareEventDispatcher.php(142): call_user_func(Array, Object(Symfony\Component\HttpKernel\Event\RequestEvent), 'kernel.request', Object(Drupal\Component\EventDispatcher\ContainerAwareEventDispatcher))
#3 H:\laragon\www\metalfans\vendor\symfony\http-kernel\HttpKernel.php(145): Drupal\Component\EventDispatcher\ContainerAwareEventDispatcher->dispatch(Object(Symfony\Component\HttpKernel\Event\RequestEvent), 'kernel.request')
#4 H:\laragon\www\metalfans\vendor\symfony\http-kernel\HttpKernel.php(81): Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object(Symfony\Component\HttpFoundation\Request), 1)
#5 H:\laragon\www\metalfans\core\lib\Drupal\Core\StackMiddleware\Session.php(58): Symfony\Component\HttpKernel\HttpKernel->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#6 H:\laragon\www\metalfans\core\lib\Drupal\Core\StackMiddleware\KernelPreHandle.php(48): Drupal\Core\StackMiddleware\Session->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#7 H:\laragon\www\metalfans\core\lib\Drupal\Core\StackMiddleware\ReverseProxyMiddleware.php(48): Drupal\Core\StackMiddleware\KernelPreHandle->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#8 H:\laragon\www\metalfans\core\lib\Drupal\Core\StackMiddleware\NegotiationMiddleware.php(51): Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#9 H:\laragon\www\metalfans\vendor\stack\builder\src\Stack\StackedHttpKernel.php(23): Drupal\Core\StackMiddleware\NegotiationMiddleware->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#10 H:\laragon\www\metalfans\core\lib\Drupal\Core\DrupalKernel.php(707): Stack\StackedHttpKernel->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#11 H:\laragon\www\metalfans\index.php(19): Drupal\Core\DrupalKernel->handle(Object(Symfony\Component\HttpFoundation\Request))
#12 {main}

Warning: Undefined variable $formstate in Drupal\spammaster\SpamMasterElusiveService->spamMasterElusiveCheck() (regel 300 van H:\laragon\www\metalfans\modules\contrib\spammaster\src\SpamMasterElusiveService.php)

🐛 Bug report
Status

Fixed

Version

1.76

Component

Code

Created by

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

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024