Uploaded image for project: 'CiviCRM'
  1. CiviCRM
  2. CRM-14345

Tcpdf library causes a warning every time it is required when open_basedir is set

    Details

    • Type: Improvement
    • Status: Done/Fixed
    • Priority: Trivial
    • Resolution: Won't Fix
    • Affects Version/s: 4.4.4
    • Fix Version/s: 4.5
    • Labels:
      None

      Description

      Wherever the tcpdf library is required it loads a config file called tcpdf_autoconfig.php. This file currently points to several image locations outside the webroot. This causes a warning to be issued whenever tcpdf is initialized. I am not sure how often this happens in core. It may not since tcpdf seems to usually be initialized by dompdf. It does happen in the tax receipts extension when we include the library.

      https://github.com/civicrm/civicrm-packages/blob/master/tcpdf/tcpdf_autoconfig.php#L94

      The suggested fix is to change to:
      $tcpdf_images_dirs = array(K_PATH_MAIN.'examples/images/', K_PATH_MAIN.'images/', K_PATH_MAIN);

      Would it make sense to issue a pull request that moves this file to the ORIGINAL folder and make this change in the tcpdf folder?

        Attachments

          Activity

            People

            • Assignee:
              timotten Tim Otten
              Reporter:
              lola_slade Lola Slade
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: