magento2: [Magento 2.4.4] Class magento/zendframework1/library/Zend/Pdf/NameTree.php not compatible with PHP 8.1
Preconditions (*)
- Magento 2.4.4
- PHP 8.1
Steps to reproduce (*)
- Go to the Sales Shipments page in admin. Select shipments and the “Print Shipping Labels” action.
Expected result (*)
- Get a PDF with all the shipment labels
Actual result (*)
- PHP crashes with the following error :
Fatal error: During inheritance of ArrayAccess: Uncaught Exception: Deprecated Functionality: Return type of Zend_Pdf_NameTree::offsetExists($offset) should either be compatible with ArrayAccess::offsetExists(mixed $offset): bool, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in vendor/magento/zendframework1/library/Zend/Pdf/NameTree.php on line 117
The error happens with the Magento\Shipping\Model\Shipping\LabelGenerator::combineLabelsPdf method.
Additional Information: Please refer below comment:
https://github.com/magento/magento2/issues/35335#issuecomment-1103902652
Please provide Severity assessment for the Issue as Reporter. This information will help during Confirmation and Issue triage processes.
- Severity: S0 - Affects critical data or functionality and leaves users without workaround.
- Severity: S1 - Affects critical data or functionality and forces users to employ a workaround.
- [*] Severity: S2 - Affects non-critical data or functionality and forces users to employ a workaround.
- Severity: S3 - Affects non-critical data or functionality and does not force users to employ a workaround.
- Severity: S4 - Affects aesthetics, professional look and feel, “quality” or “usability”.
About this issue
- Original URL
- State: open
- Created 2 years ago
- Reactions: 1
- Comments: 18 (4 by maintainers)
Done 👍
@hostep Updating magento/zendframework1 to version 1.15.1 works. Thank you