2013-08-07 41 views
0

致命錯誤:Zend_Pdf_FileParserDataSource_File聲明:: __結構()必須與Zend_Pdf_FileParserDataSource兼容:: __結構()Magento的Zend的_pdf錯誤

我的PHP版本是5.4

我需要知道,如果我升級我的PHP版本到5.5.this錯誤將得到解決或不?

回答

0

升級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時,您都必須重新應用此修補程序。

+0

我已經評論了抽象的公共函數__construct(),但它給出了另一個錯誤 – Preethy

+0

什麼是新的錯誤? –

+0

無效方法Mage_Core_Block_Template :: toPdf(陣列 ( ) ) #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() – Preethy

1

我不確定這個錯誤,但可能是您在magento模塊函數的__construct()函數中傳遞了一些參數,並且父級抽象類不接受任何參數。