Error while printing pdf invoices, packing slips etc.

If you’ve recently upgraded or have a newer version of php installed, you may receive the following error while trying to print pdf invoices, packing lists etc from the admin panel.

“Fatal error: Declaration of Zend_Pdf_FileParserDataSource_File::__construct() must be compatible with Zend_Pdf_FileParserDataSource::__construct() in …..”

After doing some research, the fix is a one line change as follows:

OPEN: lib/Zend/Pdf/FileParserDataSource.php

Change the following  around line 78 Р(comment out bstract public function __construct(); and replace with line below)


* @throws Zend_Pdf_Exception
*/
//abstract public function __construct();
abstract public function __construct($filePath);
/**
* Object destructor. Closes the data source.
*
* May also perform cleanup tasks such as deleting temporary files.
*/

You should be good to go now!

 

Leave a Reply