Fatal Error: 'Declaration of Zend_Pdf_FileParserDatasource_File::__contruct() must be compatible

NamPham picture NamPham · Mar 29, 2012 · Viewed 8.3k times · Source

Does anyone got this error?

Fatal Error: 'Declaration of Zend_Pdf_FileParserDatasource_File::__contruct() must be compatible with Zend_Pdf_FileParderDatasource::__construct() in /var/www/abc/app/vendors/Zend/Pdf/FileParserDataSource/File.php

I've googled a lot but still not find out the way to fix this bug.

Answer

Afroz Alam picture Afroz Alam · Jul 26, 2013

you can change the constructor function of lib/Zend/Pdf/FileParserDataSource.php

 abstract public function __construct(); 

to

 abstract public function __construct($filePath);

and it works like a charm.