当我尝试创建PDF发票(因为我的客户端运行PHP 5.4.19)时,Magento抛出PHP错误。Magento PHP 5.4 PDF发票Zend错误
Fatal error: Declaration of Zend_Pdf_FileParserDataSource_File::__construct() must be compatible with Zend_Pdf_FileParserDataSource::__construct() in /var/www/vhosts/website/httpdocs/includes/src/Zend_Pdf_FileParserDataSource_File.php on line 41
通常很容易通过编辑FileParserDataSource.php和注释掉两行解决这个问题,问题是,他们运行的扩展这个脚本(http://pastebin.com/J64VNsRP)一Zend_Pdf_FileParserDataSource_File.php。
是否有任何解决方案可用于在运行PHP 5.4的服务器上使用Magento创建PDF发票?
这是不可能的,因为第二个文件。 – Hidde
@Hidde,第二个文件的意思是? –
如果我注释掉函数__construct();和函数__destruct();在lib/Zend/Pdf/FileParseDataSource.php中没有任何变化,因为FileParseDataSource.php被Zend_Pdf_FileParserDataSource_File.php扩展。如果我也将该文件中的代码注释掉,我会得到一个“包含2个抽象方法,因此必须声明为抽象或实现其余方法”错误。 – Hidde