Question

I've got a standard Magento 1.8.0.0 installation on Windows 7 using the BitNami Magento installation for XAMPP.

When I open the Sales -> Invoices screen and click on an invoice and then click on the orange Print button in the upper right hand corner of the screen I get the following error message inside the web browser:

Fatal error: Declaration of Zend_Pdf_FileParserDataSource_File::__construct() must be compatible with Zend_Pdf_FileParserDataSource::__construct() in C:\xampp\apps\magento\htdocs\lib\Zend\Pdf\FileParserDataSource\File.php on line 41

Anyone know why I am getting this and how to fix this?

Was it helpful?

Solution

Magento in versions before CE 1.9 / EE 1.14 is not compatible with PHP 5.4 out of the box, which causes this error.

Anyways, there is an official patch for this.

OTHER TIPS

This an incompatibility issue between PHP Version 5.4.4 and zend Framwork .

Fixed it by change in this function lib/Zend/Pdf/FileParserDataSource.php.

change

abstract public function __construct();

to

abstract public function __construct($filePath);
Licensed under: CC-BY-SA with attribution
Not affiliated with magento.stackexchange
scroll top