Uploaded image for project: 'eZ Publish / Platform'
  1. eZ Publish / Platform
  2. EZP-14161

eZPDFTable::callImage missing inclusion of 'kernel/common/image.php'

    XMLWordPrintable

Details

    Description

      If the image to be included is of type gif then it is first converted to jpeg before being added. The call to imageInit() on line 1280 fails as the library has not only been included if the variable $params['dpi'] is set.

      Error Message:
      Call to undefined function imageInit() in /var/www/ezpublish-4.0.1/lib/ezpdf/classes/class.ezpdftable.php on line 1280

      Patch:

      ---
       lib/ezpdf/classes/class.ezpdftable.php |    1 +
       1 files changed, 1 insertions(+), 0 deletions(-)
      
      diff --git a/lib/ezpdf/classes/class.ezpdftable.php b/lib/ezpdf/classes/class.ezpdftable.php
      index 774ec13..ca07dfe 100644
      --- a/lib/ezpdf/classes/class.ezpdftable.php
      +++ b/lib/ezpdf/classes/class.ezpdftable.php
      @@ -1274,6 +1274,7 @@ class eZPDFTable extends Cezpdf
                       }
                       $newMimetype = eZMimeType::findByURL( $newFilename );
      
      +                require_once( 'kernel/common/image.php' );
                       $img = imageInit();
                       $newImg = $img->convert( $mimetype,
                                                $newMimetype,
      --
      1.5.4.3
      
      Steps to reproduce

      Create a PDF template with a gif image and attempt to generate

      Issue it pretty obvious from the error & code.

      Attachments

        Activity

          People

            cyberwolf cyberwolf
            zabbie zabbie
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: