Magento :: Fatal error: Declaration of Zend_Pdf_FileParserDataSource_File::__construct() must be compatible with Zend_Pdf_FileParserDataSource::__construct()

I got this fatal error when I'm going to print shipment. There are two solutions given by community.

First Solution:

Comment out __construct and __destruct methods in lib/Zend/Pdf/FileParserDataSource.php as follows

//    abstract public function __construct();

    /**
     * Object destructor. Closes the data source.
     *
     * May also perform cleanup tasks such as deleting temporary files.
     */
//    abstract public function __destruct();

Second Solution:

simply change the constructor function of lib/Zend/Pdf/FileParserDataSource.php
   
    abstract public function __construct();
TO
    abstract public function __construct($filePath);


Comments

Popular posts from this blog

Laravel Sail on Windows issue - "cmdlet Invoke-WebRequest at command pipeline position 1"

GIT Error: The following untracked working tree files would be overwritten by merge:

How to point Magento multi websites to domains