Deprecated function: Creation of dynamic property Cleantalk\Common\Firewall\Modules\Sfw::$set_cookies

Created on 6 September 2023, over 1 year ago
Updated 10 September 2024, 3 months ago

Problem/Motivation

My site has been upgraded to Drupal 10.1.2 and every pageload seems to generate an error in the system log.

Deprecated function: Creation of dynamic property Cleantalk\Common\Firewall\Modules\Sfw::$set_cookies is deprecated in Cleantalk\Common\Firewall\Modules\Sfw->__construct() (line 70 of /var/www/drupal/web/modules/contrib/cleantalk/lib/Cleantalk/Common/Firewall/Modules/Sfw.php)
#0 /var/www/drupal/web/core/includes/bootstrap.inc(164): _drupal_error_handler_real()
#1 /var/www/drupal/web/modules/contrib/cleantalk/lib/Cleantalk/Common/Firewall/Modules/Sfw.php(70): _drupal_error_handler()
#2 /var/www/drupal/web/modules/contrib/cleantalk/src/EventSubscriber/BootSubscriber.php(115): Cleantalk\Common\Firewall\Modules\Sfw->__construct()
#3 /var/www/drupal/web/core/lib/Drupal/Core/StackMiddleware/ReverseProxyMiddleware.php(48): Drupal\cleantalk\EventSubscriber\BootSubscriber->handle()
#4 /var/www/drupal/web/core/lib/Drupal/Core/StackMiddleware/NegotiationMiddleware.php(51): Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle()
#5 /var/www/drupal/web/core/lib/Drupal/Core/StackMiddleware/StackedHttpKernel.php(51): Drupal\Core\StackMiddleware\NegotiationMiddleware->handle()
#6 /var/www/drupal/web/core/lib/Drupal/Core/EventSubscriber/DefaultExceptionHtmlSubscriber.php(166): Drupal\Core\StackMiddleware\StackedHttpKernel->handle()
#7 /var/www/drupal/web/core/lib/Drupal/Core/EventSubscriber/CustomPageExceptionHtmlSubscriber.php(119): Drupal\Core\EventSubscriber\DefaultExceptionHtmlSubscriber->makeSubrequest()
#8 /var/www/drupal/web/core/lib/Drupal/Core/EventSubscriber/CustomPageExceptionHtmlSubscriber.php(81): Drupal\Core\EventSubscriber\CustomPageExceptionHtmlSubscriber->makeSubrequestToCustomPath()
#9 /var/www/drupal/web/core/lib/Drupal/Core/EventSubscriber/HttpExceptionSubscriberBase.php(109): Drupal\Core\EventSubscriber\CustomPageExceptionHtmlSubscriber->on404()
#10 [internal function]: Drupal\Core\EventSubscriber\HttpExceptionSubscriberBase->onException()
#11 /var/www/drupal/web/core/lib/Drupal/Component/EventDispatcher/ContainerAwareEventDispatcher.php(111): call_user_func()
#12 /var/www/drupal/vendor/symfony/http-kernel/HttpKernel.php(240): Drupal\Component\EventDispatcher\ContainerAwareEventDispatcher->dispatch()
#13 /var/www/drupal/vendor/symfony/http-kernel/HttpKernel.php(91): Symfony\Component\HttpKernel\HttpKernel->handleThrowable()
#14 /var/www/drupal/web/core/lib/Drupal/Core/StackMiddleware/Session.php(58): Symfony\Component\HttpKernel\HttpKernel->handle()
#15 /var/www/drupal/web/core/lib/Drupal/Core/StackMiddleware/KernelPreHandle.php(48): Drupal\Core\StackMiddleware\Session->handle()
#16 /var/www/drupal/web/core/modules/page_cache/src/StackMiddleware/PageCache.php(106): Drupal\Core\StackMiddleware\KernelPreHandle->handle()
#17 /var/www/drupal/web/core/modules/page_cache/src/StackMiddleware/PageCache.php(85): Drupal\page_cache\StackMiddleware\PageCache->pass()
#18 /var/www/drupal/web/modules/contrib/cleantalk/src/EventSubscriber/BootSubscriber.php(187): Drupal\page_cache\StackMiddleware\PageCache->handle()
#19 /var/www/drupal/web/core/lib/Drupal/Core/StackMiddleware/ReverseProxyMiddleware.php(48): Drupal\cleantalk\EventSubscriber\BootSubscriber->handle()
#20 /var/www/drupal/web/core/lib/Drupal/Core/StackMiddleware/NegotiationMiddleware.php(51): Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle()
#21 /var/www/drupal/web/core/lib/Drupal/Core/StackMiddleware/StackedHttpKernel.php(51): Drupal\Core\StackMiddleware\NegotiationMiddleware->handle()
#22 /var/www/drupal/web/core/lib/Drupal/Core/DrupalKernel.php(704): Drupal\Core\StackMiddleware\StackedHttpKernel->handle()
#23 /var/www/drupal/web/index.php(19): Drupal\Core\DrupalKernel->handle()
#24 {main}

As best I can tell, Cleantalk is still working (I get very little spam to this site because I keep it out of Search Engines)

Steps to reproduce

Upgrade from Drupal 9 to Drupal 10 using composer. Notice your site works, but every page load adds a message to the system log.

Site Info:

www-data@X:~/drupal$ drush @X status
Drupal version   : 10.1.2
Site URI         : https://X.com
DB driver        : mysql
DB hostname      : localhost
DB port          : 3306
DB username      : X
DB name          : X
Database         : Connected
Drupal bootstrap : Successful
Default theme    : bootstrap5
Admin theme      : adminimal_theme
PHP binary       : /usr/bin/php8.2
PHP config       : /etc/php/8.2/cli/php.ini
PHP OS           : Linux
PHP version      : 8.2.7
Drush script     : /var/www/drupal/vendor/drush/drush/drush
Drush version    : 12.1.3.0
Drush temp       : /tmp
Drush configs    : /var/www/drupal/vendor/drush/drush/drush.yml
Install profile  : standard
Drupal root      : /var/www/drupal/web
Site path        : sites/X.com
Files, Public    : sites/X.com/files
Files, Temp      : /tmp

Proposed resolution

N/A

Remaining tasks

User interface changes

API changes

Data model changes

🐛 Bug report
Status

Fixed

Version

9.2

Component

Code

Created by

🇳🇿New Zealand tjharman

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

Comments & Activities

Production build 0.71.5 2024