我是靠谱客的博主 可靠烤鸡,这篇文章主要介绍magento2.4 用户信息提示 Call to a member function getId() on null,现在分享给大家,希望可以做个参考。

问题说明:

点开用户信息提示 Call to a member function getId() on null 

解决方法

查看var/log/system.log日志文件

main.CRITICAL: Error: Call to a member function getId() on null in vendor/magento/module-customer/Block/Adminhtml/Edit/Tab/Newsletter/Grid/Renderer/Action.php:63

 确定出错位置,发现是$this->_coreRegistry->registry('subscriber')为空导致getId()出错,修改代码加入空值判断。

$this->_coreRegistry->registry('subscriber')?$this->_coreRegistry->registry('subscriber')->getId() : null

最后

以上就是可靠烤鸡最近收集整理的关于magento2.4 用户信息提示 Call to a member function getId() on null的全部内容,更多相关magento2.4内容请搜索靠谱客的其他文章。

本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
点赞(48)

评论列表共有 0 条评论

立即
投稿
返回
顶部