Deprecated function: strlen(), php 8.1.6, document file element

Created on 10 February 2023, almost 2 years ago
Updated 12 April 2023, over 1 year ago

Problem/Motivation

Drupal Version 9.5.3, PHP/8.1.6, database Version 10.4.24-MariaDB.

Deprecated function: strlen(): Passing null to parameter #1 ($string) of type string is deprecated in Drupal\Component\Utility\Unicode::validateUtf8() (line 477 of core\lib\Drupal\Component\Utility\Unicode.php).

Drupal\Component\Utility\Unicode::validateUtf8(NULL) (Line: 65)
Drupal\Component\Utility\Xss::filter(NULL) (Line: 27)
Drupal\webform_attachment_gated_download\QueryParser::getFidFromUrlParameters() (Line: 32)
webform_attachment_gated_download_webform_submission_presave(Object)
call_user_func_array(Object, Array) (Line: 426)
Drupal\Core\Extension\ModuleHandler->Drupal\Core\Extension\{closure}(Object, 'webform_attachment_gated_download') (Line: 405)
Drupal\Core\Extension\ModuleHandler->invokeAllWith('webform_submission_presave', Object) (Line: 433)
Drupal\Core\Extension\ModuleHandler->invokeAll('webform_submission_presave', Array) (Line: 249)
Drupal\Core\Entity\EntityStorageBase->invokeHook('presave', Object) (Line: 903)
Drupal\Core\Entity\ContentEntityStorageBase->invokeHook('presave', Object) (Line: 563)
Drupal\Core\Entity\EntityStorageBase->doPreSave(Object) (Line: 756)
Drupal\Core\Entity\ContentEntityStorageBase->doPreSave(Object) (Line: 966)
Drupal\webform\WebformSubmissionStorage->doPreSave(Object) (Line: 517)
Drupal\Core\Entity\EntityStorageBase->save(Object) (Line: 804)
Drupal\Core\Entity\Sql\SqlContentEntityStorage->save(Object) (Line: 983)
Drupal\webform\WebformSubmissionStorage->save(Object) (Line: 339)
Drupal\Core\Entity\EntityBase->save() (Line: 901)
Drupal\webform\Entity\WebformSubmission->save() (Line: 1995)
Drupal\webform\WebformSubmissionForm->save(Array, Object)
call_user_func_array(Array, Array) (Line: 114)
Drupal\Core\Form\FormSubmitter->executeSubmitHandlers(Array, Object) (Line: 52)
Drupal\Core\Form\FormSubmitter->doSubmitForm(Array, Object) (Line: 595)
Drupal\Core\Form\FormBuilder->processForm('webform_submission_test_add_form', Array, Object) (Line: 323)
Drupal\Core\Form\FormBuilder->buildForm(Object, Object) (Line: 48)
Drupal\Core\Entity\EntityFormBuilder->getForm(Object, 'add') (Line: 1250)
Drupal\webform\Entity\Webform->getSubmissionForm() (Line: 77)
Drupal\webform\Controller\WebformEntityController->addForm(Object, Object)
call_user_func_array(Array, Array) (Line: 123)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() (Line: 580)
Drupal\Core\Render\Renderer->executeInRenderContext(Object, Object) (Line: 124)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->wrapControllerExecutionInRenderContext(Array, Array) (Line: 97)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() (Line: 169)
Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object, 1) (Line: 81)
Symfony\Component\HttpKernel\HttpKernel->handle(Object, 1, 1) (Line: 58)
Drupal\Core\StackMiddleware\Session->handle(Object, 1, 1) (Line: 48)
Drupal\Core\StackMiddleware\KernelPreHandle->handle(Object, 1, 1) (Line: 106)
Drupal\page_cache\StackMiddleware\PageCache->pass(Object, 1, 1) (Line: 85)
Drupal\page_cache\StackMiddleware\PageCache->handle(Object, 1, 1) (Line: 48)
Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle(Object, 1, 1) (Line: 51)
Drupal\Core\StackMiddleware\NegotiationMiddleware->handle(Object, 1, 1) (Line: 23)
Stack\StackedHttpKernel->handle(Object, 1, 1) (Line: 713)
Drupal\Core\DrupalKernel->handle(Object) (Line: 19)

Deprecated function: str_replace(): Passing null to parameter #3 ($subject) of type array|string is deprecated in Drupal\Component\Utility\Xss::filter() (line 69 of core\lib\Drupal\Component\Utility\Xss.php).

Drupal\Component\Utility\Xss::filter(NULL) (Line: 27)
Drupal\webform_attachment_gated_download\QueryParser::getFidFromUrlParameters() (Line: 32)
webform_attachment_gated_download_webform_submission_presave(Object)
call_user_func_array(Object, Array) (Line: 426)
Drupal\Core\Extension\ModuleHandler->Drupal\Core\Extension\{closure}(Object, 'webform_attachment_gated_download') (Line: 405)
Drupal\Core\Extension\ModuleHandler->invokeAllWith('webform_submission_presave', Object) (Line: 433)
Drupal\Core\Extension\ModuleHandler->invokeAll('webform_submission_presave', Array) (Line: 249)
Drupal\Core\Entity\EntityStorageBase->invokeHook('presave', Object) (Line: 903)
Drupal\Core\Entity\ContentEntityStorageBase->invokeHook('presave', Object) (Line: 563)
Drupal\Core\Entity\EntityStorageBase->doPreSave(Object) (Line: 756)
Drupal\Core\Entity\ContentEntityStorageBase->doPreSave(Object) (Line: 966)
Drupal\webform\WebformSubmissionStorage->doPreSave(Object) (Line: 517)
Drupal\Core\Entity\EntityStorageBase->save(Object) (Line: 804)
Drupal\Core\Entity\Sql\SqlContentEntityStorage->save(Object) (Line: 983)
Drupal\webform\WebformSubmissionStorage->save(Object) (Line: 339)
Drupal\Core\Entity\EntityBase->save() (Line: 901)
Drupal\webform\Entity\WebformSubmission->save() (Line: 1995)
Drupal\webform\WebformSubmissionForm->save(Array, Object)
call_user_func_array(Array, Array) (Line: 114)
Drupal\Core\Form\FormSubmitter->executeSubmitHandlers(Array, Object) (Line: 52)
Drupal\Core\Form\FormSubmitter->doSubmitForm(Array, Object) (Line: 595)
Drupal\Core\Form\FormBuilder->processForm('webform_submission_test_add_form', Array, Object) (Line: 323)
Drupal\Core\Form\FormBuilder->buildForm(Object, Object) (Line: 48)
Drupal\Core\Entity\EntityFormBuilder->getForm(Object, 'add') (Line: 1250)
Drupal\webform\Entity\Webform->getSubmissionForm() (Line: 77)
Drupal\webform\Controller\WebformEntityController->addForm(Object, Object)
call_user_func_array(Array, Array) (Line: 123)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() (Line: 580)
Drupal\Core\Render\Renderer->executeInRenderContext(Object, Object) (Line: 124)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->wrapControllerExecutionInRenderContext(Array, Array) (Line: 97)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() (Line: 169)
Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object, 1) (Line: 81)
Symfony\Component\HttpKernel\HttpKernel->handle(Object, 1, 1) (Line: 58)
Drupal\Core\StackMiddleware\Session->handle(Object, 1, 1) (Line: 48)
Drupal\Core\StackMiddleware\KernelPreHandle->handle(Object, 1, 1) (Line: 106)
Drupal\page_cache\StackMiddleware\PageCache->pass(Object, 1, 1) (Line: 85)
Drupal\page_cache\StackMiddleware\PageCache->handle(Object, 1, 1) (Line: 48)
Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle(Object, 1, 1) (Line: 51)
Drupal\Core\StackMiddleware\NegotiationMiddleware->handle(Object, 1, 1) (Line: 23)
Stack\StackedHttpKernel->handle(Object, 1, 1) (Line: 713)
Drupal\Core\DrupalKernel->handle(Object) (Line: 19)

I suppose is a webform issue and not of the core.

Steps to reproduce

Just create a form with only a Document File element.

πŸ› Bug report
Status

Closed: outdated

Version

6.2

Component

Code

Created by

πŸ‡¬πŸ‡·Greece atsio

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