Magento2: PHP错误已弃用功能:



谁能帮我一下?

我得到这个错误时,我试图设置:di:编译与Magento

已弃用的功能:可选参数$ids在必选参数$checkedCat之前声明,在/home/seedsa
t/public_html/magento244/app/code/MGS/Fbuilder/Helper/Data.php中隐式地作为必选参数处理,第162行

第162行是这样的:公共函数getTreeCategory($category, $parent, $ids = [], $checkedCat)

这种情况发生在最近的PHP版本上。错误提示可选形参必须位于函数实参列表的末尾。不是在中间,因为在可选参数之后再加一个必选参数是没有意义的。

升级Magento或更改功能:

getTreeCategory($category, $parent, $ids = [], $checkedCat = null)

最新更新