Log _dompdf_warnings

Created on 14 November 2022, over 1 year ago
Updated 4 September 2023, 10 months ago

Problem/Motivation

Users have problems DomPdf but have trouble reporting the error messages. Dompdf writes errors and warnings to the global variable _dompdf_warnings.

Proposed resolution

We should log these warnings.

    if (is_array($GLOBALS['_dompdf_warnings'])) {
      foreach ($GLOBALS['_dompdf_warnings'] as $warning) {
        \Drupal::logger('pdf api')->warning($warning);
      }
    }
πŸ“Œ Task
Status

Fixed

Version

2.0

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States bluegeek9

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

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.69.0 2024