Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

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.

like image 218
NamPham Avatar asked Mar 29 '12 09:03

NamPham


2 Answers

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.

like image 112
Afroz Alam Avatar answered Nov 17 '22 00:11

Afroz Alam


Have you tried commenting out __construct and __destruct abstract methods in Zend/Pdf/FileParserDataSource.php

//    abstract public function __construct();
//    abstract public function __destruct();

It worked for me.

This error has something to do with inheritance in latest versions of PHP.

like image 24
Pavel P Avatar answered Nov 17 '22 01:11

Pavel P