PHP8 deprecated function warnings in version 3.0

Created on 29 November 2024, 20 days ago

Problem/Motivation

When linking to a view, which generates a PDF on-the-fly with Format "PDF Unformatted" I see:

Deprecated function: Automatic conversion of false to array is deprecated in Drupal\views_pdf\PdfLibrary\FPDI->addPage() (line 1011 of /home/techsoco/d10-dev-2.techsoc.org.uk/public_html/modules/contrib/views_pdf/src/PdfLibrary/FPDI.php)

Proposed resolution

This and other PHP8 deprecations were reported for version 7.x-3.1 of Views PDF under issue 🐛 PHP8 deprecated function warnings Needs review . The same code as was deprecated there (in views_pdf/views_pdf_template.php) appears in the 3.0.0-alpha10 version of Views PDF (in PdfLibrary/FPDI.php).

The PHP 8.1 fixes approved in MR !5 for Views PDF 7.x-3.1 need to be applied to the 3.* version.

Issue 🐛 PHP8 deprecated function warnings Needs review also references a PHP 8.2 deprecation, which I presume will also be reported by 3.0.0-alpha10, as the code there is the same as in the 7.x-3.1 version, but I've not run 3.0.0-alpha10 with PHP 8.2.

🐛 Bug report
Status

Active

Version

3.0

Component

Code

Created by

🇬🇧United Kingdom stevewilson

Live updates comments and jobs are added and updated live.
  • PHP 8.1

    The issue particularly affects sites running on PHP version 8.1.0 or later.

Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024