【问题标题】:magento zend _pdf errormagento zend _pdf错误
【发布时间】:2013-08-07 08:10:07
【问题描述】:

致命错误:Zend_Pdf_FileParserDataSource_File::__construct() 的声明必须与 Zend_Pdf_FileParserDataSource::__construct() 兼容

我的php版本是5.4

我需要知道我是否将我的 php 版本升级到 5.5。这个错误会得到解决吗?

【问题讨论】:

    标签: magento zend-framework


    【解决方案1】:

    我不确定这个错误,但也许您在 magento 模块函数的 __construct() 函数中传递了一些参数,而父抽象类不接受任何参数。

    【讨论】:

      【解决方案2】:

      升级 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 时,您都必须重新应用此修复程序。

      【讨论】:

      • 我已经评论了抽象公共函数 __construct() 但它给出了另一个错误
      • 方法无效 Mage_Core_Block_Template::toPdf(Array ( ) ) #0 /usr/www/users/stagepegrq/app/code/core/Mage/Payment/Block/Info.php(92): Varien_Object ->__call('toPdf', Array) #1 /usr/www/users/stagepegrq/app/code/core/Mage/Payment/Block/Info.php(92): Mage_Core_Block_Template->toPdf() #2 /usr /www/users/stagepegrq/app/design/adminhtml/default/default/template/payment/info/pdf/default.phtml(40): Mage_Payment_Block_Info->getChildPdfAsArray()
      猜你喜欢
      • 2013-10-31
      • 2017-09-13
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2014-03-03
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多