Deprecated function: urldecode(): Passing null to parameter #1 ($string) of type string is deprecated

Created on 25 April 2024, 8 months ago
Updated 10 September 2024, 3 months ago

Problem/Motivation

I'm seeing these errors in my Watchdog log when a user tries to use my site's contact form. I have anti-spam validation enabled for the form. I'm using PHP 8.1.2:

Deprecated function: urldecode(): Passing null to parameter #1 ($string) of type string is deprecated in Drupal\cleantalk\CleantalkFuncs::_cleantalk_apbct_cookies_test() (line 245 of /var/www/mysite/web/modules/contrib/cleantalk/src/CleantalkFuncs.php)
#0 /var/www/mysite/web/core/includes/bootstrap.inc(164): _drupal_error_handler_real()
#1 [internal function]: _drupal_error_handler()
#2 /var/www/mysite/web/modules/contrib/cleantalk/src/CleantalkFuncs.php(245): urldecode()
#3 /var/www/mysite/web/modules/contrib/cleantalk/src/CleantalkFuncs.php(500): Drupal\cleantalk\CleantalkFuncs::_cleantalk_apbct_cookies_test()
#4 /var/www/mysite/web/modules/contrib/cleantalk/cleantalk.module(250): Drupal\cleantalk\CleantalkFuncs::_cleantalk_check_spam()
#5 [internal function]: cleantalk_validate_contact_message()
#6 /var/www/mysite/web/core/lib/Drupal/Core/Form/FormValidator.php(82): call_user_func_array()
#7 /var/www/mysite/web/core/lib/Drupal/Core/Form/FormValidator.php(275): Drupal\Core\Form\FormValidator->executeValidateHandlers()
#8 /var/www/mysite/web/core/lib/Drupal/Core/Form/FormValidator.php(118): Drupal\Core\Form\FormValidator->doValidateForm()
#9 /var/www/mysite/web/core/lib/Drupal/Core/Form/FormBuilder.php(593): Drupal\Core\Form\FormValidator->validateForm()
#10 /var/www/mysite/web/core/lib/Drupal/Core/Form/FormBuilder.php(325): Drupal\Core\Form\FormBuilder->processForm()
#11 /var/www/mysite/web/core/lib/Drupal/Core/Entity/EntityFormBuilder.php(48): Drupal\Core\Form\FormBuilder->buildForm()
#12 /var/www/mysite/web/core/modules/contact/src/Controller/ContactController.php(86): Drupal\Core\Entity\EntityFormBuilder->getForm()
#13 [internal function]: Drupal\contact\Controller\ContactController->contactSitePage()
#14 /var/www/mysite/web/core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.php(123): call_user_func_array()
#15 /var/www/mysite/web/core/lib/Drupal/Core/Render/Renderer.php(627): Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}()
#16 /var/www/mysite/web/core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.php(124): Drupal\Core\Render\Renderer->executeInRenderContext()
#17 /var/www/mysite/web/core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.php(97): Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->wrapControllerExecutionInRenderContext()
#18 /var/www/mysite/vendor/symfony/http-kernel/HttpKernel.php(181): Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}()
#19 /var/www/mysite/vendor/symfony/http-kernel/HttpKernel.php(76): Symfony\Component\HttpKernel\HttpKernel->handleRaw()
#20 /var/www/mysite/web/core/lib/Drupal/Core/StackMiddleware/Session.php(58): Symfony\Component\HttpKernel\HttpKernel->handle()
#21 /var/www/mysite/web/core/lib/Drupal/Core/StackMiddleware/KernelPreHandle.php(48): Drupal\Core\StackMiddleware\Session->handle()
#22 /var/www/mysite/web/core/lib/Drupal/Core/StackMiddleware/ContentLength.php(28): Drupal\Core\StackMiddleware\KernelPreHandle->handle()
#23 /var/www/mysite/web/core/modules/big_pipe/src/StackMiddleware/ContentLength.php(32): Drupal\Core\StackMiddleware\ContentLength->handle()
#24 /var/www/mysite/web/core/modules/page_cache/src/StackMiddleware/PageCache.php(106): Drupal\big_pipe\StackMiddleware\ContentLength->handle()
#25 /var/www/mysite/web/core/modules/page_cache/src/StackMiddleware/PageCache.php(85): Drupal\page_cache\StackMiddleware\PageCache->pass()
#26 /var/www/mysite/web/modules/contrib/cleantalk/src/EventSubscriber/BootSubscriber.php(193): Drupal\page_cache\StackMiddleware\PageCache->handle()
#27 /var/www/mysite/web/core/modules/ban/src/BanMiddleware.php(50): Drupal\cleantalk\EventSubscriber\BootSubscriber->handle()
#28 /var/www/mysite/web/core/lib/Drupal/Core/StackMiddleware/ReverseProxyMiddleware.php(48): Drupal\ban\BanMiddleware->handle()
#29 /var/www/mysite/web/core/lib/Drupal/Core/StackMiddleware/NegotiationMiddleware.php(51): Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle()
#30 /var/www/mysite/web/core/lib/Drupal/Core/StackMiddleware/AjaxPageState.php(36): Drupal\Core\StackMiddleware\NegotiationMiddleware->handle()
#31 /var/www/mysite/web/core/lib/Drupal/Core/StackMiddleware/StackedHttpKernel.php(51): Drupal\Core\StackMiddleware\AjaxPageState->handle()
#32 /var/www/mysite/web/core/lib/Drupal/Core/DrupalKernel.php(704): Drupal\Core\StackMiddleware\StackedHttpKernel->handle()
#33 /var/www/mysite/web/index.php(19): Drupal\Core\DrupalKernel->handle()
#34 {main}
🐛 Bug report
Status

Fixed

Version

9.3

Component

Code

Created by

🇺🇸United States sah62 US

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

Merge Requests

Comments & Activities

Production build 0.71.5 2024