You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(drupal): Fix PHP 8.2 serialization issue in PdfConversionForm
The readonly constructor-promoted property $conversionService was not
surviving Drupal's AJAX form rebuilds due to PHP 8.2 serialization
behavior. Changed to nullable protected property with lazy loading
via getConversionService() method.
This fixes the "Typed property must not be accessed before
initialization" error when uploading PDF files.
Copy file name to clipboardExpand all lines: cloudformation/scenarios/localgov-drupal/drupal/web/modules/custom/ndx_aws_ai/src/Form/PdfConversionForm.php
+31-6Lines changed: 31 additions & 6 deletions
Original file line number
Diff line number
Diff line change
@@ -25,15 +25,25 @@ class PdfConversionForm extends FormBase {
25
25
*/
26
26
privateconstMAX_UPLOAD_SIZE_MB = 5;
27
27
28
+
/**
29
+
* The PDF conversion service.
30
+
*
31
+
* Note: Not using readonly constructor promotion to avoid PHP 8.2
32
+
* serialization issues during Drupal AJAX form rebuilds.
0 commit comments