【发布时间】:2018-03-28 21:08:30
【问题描述】:
Magneto 1.9.3 移至 PHP 版本 7.0.23 的新服务器
我将我的 Magento 网站服务器更新为新的 PHP 版本;现在是 7.0.23,但在此之前它工作正常。现在它给了我这个错误:
致命错误:未捕获的类型错误:参数 1 传递给 Mage_Core_Model_Store_Group::setWebsite() 必须是 Mage_Core_Model_Website,null 给定,调用
我也尝试了 php 7 的 inchoo 补丁,但没有任何效果。 https://github.com/Inchoo/Inchoo_PHP7
【问题讨论】:
-
该行特别读取
public function setWebsite(Mage_Core_Model_Website $website)- 接受 PHP 7 中的null必须声明$website可以为空(例如setWebsite(Mage_Core_Model_Website $website = null)。Inchoo 补丁安装正确吗?Magento 1.9x 实际上并不是开箱即用的 PHP7 兼容。 -
是的补丁安装正确@CD001
-
@CD001 您的参考对您有很大帮助,谢谢...
标签: php magento magento-1.9 php-7