问题描述
我收到以下错误:
{"0":"Notice: Trying to access array offset on value of type null in CustomerRepository.PHP on line 76"
public function afterGetById(\Magento\Customer\Model\ResourceModel\CustomerRepository $subject,$customer)
{
$customerObject = $this->helperContactPerson->customerFactory->create()->load($customer->getId());
$extensionAttributes = $customer->getExtensionAttributes();
if ($this->helperContactPerson->isContactPerson($customerObject)) {
$customerData = $this->helperContactPerson->getCustomerId($customer->getId());
$extensionAttributes->setCompanyId($customerData['customer_id']);
}
$currencyCode = $this->storeManager->getStore()->getCurrentCurrencyCode();
$currency = $this->currencyFactory->create()->load($currencyCode);
$currencySymbol = $currency->getCurrencySymbol();
$extensionAttributes->setCurrencyCode($currencyCode);
$extensionAttributes->setCurrency($currencySymbol);
$customer->setExtensionAttributes($extensionAttributes);
return $customer;
}
}
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)