PHP 8.4 compatibility

Created on 9 July 2025, about 1 month ago

Problem/Motivation

Using the default value for the escape parameter for the fputcsv() is deprecated in PHP 8.4.

Steps to reproduce

  • Use PHP 8.4
  • Enable module webform_submission_export_import
  • Go to /admin/structure/webform/manage/contact/results/upload/example/view
  • Go to /admin/reports/dblog
  • See
    Deprecated function: fputcsv(): the $escape parameter must be provided as its default value will change in Drupal\webform_submission_export_import\Controller\WebformSubmissionExportImportController->{closure:Drupal\webform_submission_export_import\Controller\WebformSubmissionExportImportController::createResponse():91}() (line 101 of /var/www/html/web/modules/contrib/webform/modules/webform_submission_export_import/src/Controller/WebformSubmissionExportImportController.php)

Proposed resolution

Use a named argument to call fputcsv and use the default value. Named arguments are supported since PHP 8.0.

📌 Task
Status

Active

Version

6.3

Component

Code

Created by

🇩🇪Germany hosterholz

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

Comments & Activities

Production build 0.71.5 2024