Closed (fixed)
Project:
FillPDF
Version:
5.1.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
13 Jan 2023 at 11:47 UTC
Updated:
2 May 2023 at 13:04 UTC
Jump to comment: Most recent
D9.5.1 on php 8.1 using pdftk (2.02-5) from ubuntu 22.04
gives multiple errors like this:
Error message
Deprecated function: in_array(): Passing null to parameter #3 ($strict) of type bool is deprecated in Drupal\fillpdf\Plugin\PdfBackend\PdftkPdfBackend->parseFile() (line 145 of modules/contrib/fillpdf/src/Plugin/PdfBackend/PdftkPdfBackend.php).
Drupal\fillpdf\Plugin\PdfBackend\PdftkPdfBackend->parseFile(Object) (Line: 102)
Drupal\fillpdf\InputHelper->parseFields(Object) (Line: 79)
Drupal\fillpdf\InputHelper->attachPdfToForm(Object) (Line: 177)
Drupal\fillpdf\Form\FillPdfOverviewForm->submitForm(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('fillpdf_forms_admin', Array, Object) (Line: 323)
Drupal\Core\Form\FormBuilder->buildForm(Object, Object) (Line: 73)
Drupal\Core\Controller\FormController->getContentResult(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)
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #2
liam morlandWhat are the steps for reproducing this?
Comment #3
liam morlandComment #4
bohemier commentedAlso getting this:
- install fillpdf, enable it
- I use pdftk. Not sure if other services result in the same error
- upload a fillable pdf in admin/structure/fillpdf
field mapping screen results in the mentioned php 8.1 compatibility errors with in_array function
Comment #6
bohemier commentedYes, it is pdftk specific. Created MR with fix.
Comment #7
bohemier commentedComment #9
liam morlandThanks!