请帮帮我
在第55行的C:\ xampp \ htdocs \ project_sms \ src \ Com \ AkSolutions \ Sms \ UserBundle \ Form \ Type \ UserSendMessageType.php
$form = $event->getForm();
$form->getData()->setFromUserId($this->user->getId());
$form->getData()->setFromName($this->userProfile->getFirstName()."".$this->userProfile->getLastName());
$form->getData()->setUserType($this->userType);
$form->getData()->setReadStatus(false);
$form->getData()->setDeleteStatus(false);
答案 0 :(得分:0)
问题似乎在这里:
$this->userProfile->getFirstName()
特别是错误告诉你这个表达式:
$this->userProfile
为空