【发布时间】:2013-08-07 08:10:07
【问题描述】:
致命错误:Zend_Pdf_FileParserDataSource_File::__construct() 的声明必须与 Zend_Pdf_FileParserDataSource::__construct() 兼容
我的php版本是5.4
我需要知道我是否将我的 php 版本升级到 5.5。这个错误会得到解决吗?
【问题讨论】:
致命错误:Zend_Pdf_FileParserDataSource_File::__construct() 的声明必须与 Zend_Pdf_FileParserDataSource::__construct() 兼容
我的php版本是5.4
我需要知道我是否将我的 php 版本升级到 5.5。这个错误会得到解决吗?
【问题讨论】:
我不确定这个错误,但也许您在 magento 模块函数的 __construct() 函数中传递了一些参数,而父抽象类不接受任何参数。
【讨论】:
升级 PHP 不会修复它。这是bug in Zend Framework that was fixed in version 1.12。我不使用 Magento,但据我所知,它附带 1.11.1 版本(大约三年前)。
在 Magento 更新之前,您最好的选择可能是将修复应用到 Magento 安装中的 ZF 副本。您需要做的就是注释掉lib/Zend/Pdf/FileParserDataSource.php 中的构造函数,也就是这一行:https://github.com/magento/magento2/blob/master/lib/Zend/Pdf/FileParserDataSource.php#L78。每次更新 Magento 时,您都必须重新应用此修复程序。
【讨论】: